From ed92494fc13b2da110d228f2e7f770c9d0eab163 Mon Sep 17 00:00:00 2001
From: Mariem Baccari
Name of the kubernetes cluster that will host this DSS instance (should generally describe the DSS instance being hosted)
Example: dss-che-1
string)Kubernetes CPU limit of the core-service containers. +Not set by default.
+Example: 1
""string)Kubernetes CPU request of the core-service containers. +Not set by default.
+Example: 0.5
""string)Kubernetes memory limit of the core-service containers. +Not set by default.
+Example: 2Gi
""string)Kubernetes memory request of the core-service containers. +Not set by default.
+Example: 2Gi
""string)Size of the CockroachDB storage engine cache, passed to the --cache flag of cockroach start.
@@ -146,6 +170,18 @@ The CRDB cluster name must be 6-20 characters in length, and can include lowerca
and dashes (but no leading or trailing dashes). A cluster's name cannot be edited after it is created.
Example: interuss-us-production
string)Kubernetes CPU limit of the CockroachDB containers. +Not set by default.
+Example: 3.5
""string)Kubernetes CPU request of the CockroachDB containers. +Not set by default.
+Example: 3.5
""list(string))Fully-qualified domain name of existing CRDB nodes outside of the cluster if you are joining an existing pool. @@ -172,6 +208,18 @@ From v.17, the recommended CockroachDB version is v24.1.3.
Either a percentage of the memory available to the container or an absolute size.Example: 25% or 2GiB
"25%"string)Kubernetes memory limit of the CockroachDB containers. +Not set by default.
+Example: 14Gi
""string)Kubernetes memory request of the CockroachDB containers. +Not set by default.
+Example: 14Gi
""number)Maximum number of open connections to the datastore.
diff --git a/deploy/infrastructure/modules/terraform-aws-dss/main.tf b/deploy/infrastructure/modules/terraform-aws-dss/main.tf index 4eec91adf..e4acaebe1 100644 --- a/deploy/infrastructure/modules/terraform-aws-dss/main.tf +++ b/deploy/infrastructure/modules/terraform-aws-dss/main.tf @@ -28,6 +28,14 @@ module "terraform-commons-dss" { crdb_cluster_name = var.crdb_cluster_name crdb_cache = var.crdb_cache crdb_max_sql_memory = var.crdb_max_sql_memory + crdb_cpu_request = var.crdb_cpu_request + crdb_memory_request = var.crdb_memory_request + crdb_cpu_limit = var.crdb_cpu_limit + crdb_memory_limit = var.crdb_memory_limit + core_service_cpu_request = var.core_service_cpu_request + core_service_memory_request = var.core_service_memory_request + core_service_cpu_limit = var.core_service_cpu_limit + core_service_memory_limit = var.core_service_memory_limit db_hostname_suffix = var.db_hostname_suffix datastore_type = var.datastore_type datastore_max_open_conns = var.datastore_max_open_conns diff --git a/deploy/infrastructure/modules/terraform-aws-dss/variables.gen.tf b/deploy/infrastructure/modules/terraform-aws-dss/variables.gen.tf index d0787d597..ec2d0daa8 100644 --- a/deploy/infrastructure/modules/terraform-aws-dss/variables.gen.tf +++ b/deploy/infrastructure/modules/terraform-aws-dss/variables.gen.tf @@ -459,6 +459,110 @@ variable "crdb_max_sql_memory" { } +variable "crdb_cpu_request" { + type = string + description = <<-EOT + Kubernetes CPU request of the CockroachDB containers. + Not set by default. + + Example: `3.5` + EOT + + default = "" +} + + +variable "crdb_memory_request" { + type = string + description = <<-EOT + Kubernetes memory request of the CockroachDB containers. + Not set by default. + + Example: `14Gi` + EOT + + default = "" +} + + +variable "crdb_cpu_limit" { + type = string + description = <<-EOT + Kubernetes CPU limit of the CockroachDB containers. + Not set by default. + + Example: `3.5` + EOT + + default = "" +} + + +variable "crdb_memory_limit" { + type = string + description = <<-EOT + Kubernetes memory limit of the CockroachDB containers. + Not set by default. + + Example: `14Gi` + EOT + + default = "" +} + + +variable "core_service_cpu_request" { + type = string + description = <<-EOT + Kubernetes CPU request of the core-service containers. + Not set by default. + + Example: `0.5` + EOT + + default = "" +} + + +variable "core_service_memory_request" { + type = string + description = <<-EOT + Kubernetes memory request of the core-service containers. + Not set by default. + + Example: `2Gi` + EOT + + default = "" +} + + +variable "core_service_cpu_limit" { + type = string + description = <<-EOT + Kubernetes CPU limit of the core-service containers. + Not set by default. + + Example: `1` + EOT + + default = "" +} + + +variable "core_service_memory_limit" { + type = string + description = <<-EOT + Kubernetes memory limit of the core-service containers. + Not set by default. + + Example: `2Gi` + EOT + + default = "" +} + + variable "locality" { type = string description = <<-EOT diff --git a/deploy/infrastructure/modules/terraform-google-dss/TFVARS.gen.md b/deploy/infrastructure/modules/terraform-google-dss/TFVARS.gen.md index 0958eef17..c638819ad 100644 --- a/deploy/infrastructure/modules/terraform-google-dss/TFVARS.gen.md +++ b/deploy/infrastructure/modules/terraform-google-dss/TFVARS.gen.md @@ -76,6 +76,30 @@ Example:Name of the kubernetes cluster that will host this DSS instance (should generally describe the DSS instance being hosted)
Example: dss-che-1
string)Kubernetes CPU limit of the core-service containers. +Not set by default.
+Example: 1
""string)Kubernetes CPU request of the core-service containers. +Not set by default.
+Example: 0.5
""string)Kubernetes memory limit of the core-service containers. +Not set by default.
+Example: 2Gi
""string)Kubernetes memory request of the core-service containers. +Not set by default.
+Example: 2Gi
""string)Size of the CockroachDB storage engine cache, passed to the --cache flag of cockroach start.
@@ -91,6 +115,18 @@ The CRDB cluster name must be 6-20 characters in length, and can include lowerca
and dashes (but no leading or trailing dashes). A cluster's name cannot be edited after it is created.
Example: interuss-us-production
string)Kubernetes CPU limit of the CockroachDB containers. +Not set by default.
+Example: 3.5
""string)Kubernetes CPU request of the CockroachDB containers. +Not set by default.
+Example: 3.5
""list(string))Fully-qualified domain name of existing CRDB nodes outside of the cluster if you are joining an existing pool. @@ -117,6 +153,18 @@ From v.17, the recommended CockroachDB version is v24.1.3.
Either a percentage of the memory available to the container or an absolute size.Example: 25% or 2GiB
"25%"string)Kubernetes memory limit of the CockroachDB containers. +Not set by default.
+Example: 14Gi
""string)Kubernetes memory request of the CockroachDB containers. +Not set by default.
+Example: 14Gi
""number)Maximum number of open connections to the datastore.
diff --git a/deploy/infrastructure/modules/terraform-google-dss/main.tf b/deploy/infrastructure/modules/terraform-google-dss/main.tf index 8ffd534f4..9882ff858 100644 --- a/deploy/infrastructure/modules/terraform-google-dss/main.tf +++ b/deploy/infrastructure/modules/terraform-google-dss/main.tf @@ -27,6 +27,14 @@ module "terraform-commons-dss" { crdb_cluster_name = var.crdb_cluster_name crdb_cache = var.crdb_cache crdb_max_sql_memory = var.crdb_max_sql_memory + crdb_cpu_request = var.crdb_cpu_request + crdb_memory_request = var.crdb_memory_request + crdb_cpu_limit = var.crdb_cpu_limit + crdb_memory_limit = var.crdb_memory_limit + core_service_cpu_request = var.core_service_cpu_request + core_service_memory_request = var.core_service_memory_request + core_service_cpu_limit = var.core_service_cpu_limit + core_service_memory_limit = var.core_service_memory_limit db_hostname_suffix = var.db_hostname_suffix datastore_type = var.datastore_type datastore_max_open_conns = var.datastore_max_open_conns diff --git a/deploy/infrastructure/modules/terraform-google-dss/variables.gen.tf b/deploy/infrastructure/modules/terraform-google-dss/variables.gen.tf index 543ec91c6..e2776c298 100644 --- a/deploy/infrastructure/modules/terraform-google-dss/variables.gen.tf +++ b/deploy/infrastructure/modules/terraform-google-dss/variables.gen.tf @@ -426,6 +426,110 @@ variable "crdb_max_sql_memory" { } +variable "crdb_cpu_request" { + type = string + description = <<-EOT + Kubernetes CPU request of the CockroachDB containers. + Not set by default. + + Example: `3.5` + EOT + + default = "" +} + + +variable "crdb_memory_request" { + type = string + description = <<-EOT + Kubernetes memory request of the CockroachDB containers. + Not set by default. + + Example: `14Gi` + EOT + + default = "" +} + + +variable "crdb_cpu_limit" { + type = string + description = <<-EOT + Kubernetes CPU limit of the CockroachDB containers. + Not set by default. + + Example: `3.5` + EOT + + default = "" +} + + +variable "crdb_memory_limit" { + type = string + description = <<-EOT + Kubernetes memory limit of the CockroachDB containers. + Not set by default. + + Example: `14Gi` + EOT + + default = "" +} + + +variable "core_service_cpu_request" { + type = string + description = <<-EOT + Kubernetes CPU request of the core-service containers. + Not set by default. + + Example: `0.5` + EOT + + default = "" +} + + +variable "core_service_memory_request" { + type = string + description = <<-EOT + Kubernetes memory request of the core-service containers. + Not set by default. + + Example: `2Gi` + EOT + + default = "" +} + + +variable "core_service_cpu_limit" { + type = string + description = <<-EOT + Kubernetes CPU limit of the core-service containers. + Not set by default. + + Example: `1` + EOT + + default = "" +} + + +variable "core_service_memory_limit" { + type = string + description = <<-EOT + Kubernetes memory limit of the core-service containers. + Not set by default. + + Example: `2Gi` + EOT + + default = "" +} + + variable "locality" { type = string description = <<-EOT diff --git a/deploy/infrastructure/utils/definitions/core_service_cpu_limit.tf b/deploy/infrastructure/utils/definitions/core_service_cpu_limit.tf new file mode 100644 index 000000000..902f04e89 --- /dev/null +++ b/deploy/infrastructure/utils/definitions/core_service_cpu_limit.tf @@ -0,0 +1,11 @@ +variable "core_service_cpu_limit" { + type = string + description = <<-EOT + Kubernetes CPU limit of the core-service containers. + Not set by default. + + Example: `1` + EOT + + default = "" +} diff --git a/deploy/infrastructure/utils/definitions/core_service_cpu_request.tf b/deploy/infrastructure/utils/definitions/core_service_cpu_request.tf new file mode 100644 index 000000000..5d40f7da2 --- /dev/null +++ b/deploy/infrastructure/utils/definitions/core_service_cpu_request.tf @@ -0,0 +1,11 @@ +variable "core_service_cpu_request" { + type = string + description = <<-EOT + Kubernetes CPU request of the core-service containers. + Not set by default. + + Example: `0.5` + EOT + + default = "" +} diff --git a/deploy/infrastructure/utils/definitions/core_service_memory_limit.tf b/deploy/infrastructure/utils/definitions/core_service_memory_limit.tf new file mode 100644 index 000000000..5f163655e --- /dev/null +++ b/deploy/infrastructure/utils/definitions/core_service_memory_limit.tf @@ -0,0 +1,11 @@ +variable "core_service_memory_limit" { + type = string + description = <<-EOT + Kubernetes memory limit of the core-service containers. + Not set by default. + + Example: `2Gi` + EOT + + default = "" +} diff --git a/deploy/infrastructure/utils/definitions/core_service_memory_request.tf b/deploy/infrastructure/utils/definitions/core_service_memory_request.tf new file mode 100644 index 000000000..2238f0f96 --- /dev/null +++ b/deploy/infrastructure/utils/definitions/core_service_memory_request.tf @@ -0,0 +1,11 @@ +variable "core_service_memory_request" { + type = string + description = <<-EOT + Kubernetes memory request of the core-service containers. + Not set by default. + + Example: `2Gi` + EOT + + default = "" +} diff --git a/deploy/infrastructure/utils/definitions/crdb_cpu_limit.tf b/deploy/infrastructure/utils/definitions/crdb_cpu_limit.tf new file mode 100644 index 000000000..255f336c7 --- /dev/null +++ b/deploy/infrastructure/utils/definitions/crdb_cpu_limit.tf @@ -0,0 +1,11 @@ +variable "crdb_cpu_limit" { + type = string + description = <<-EOT + Kubernetes CPU limit of the CockroachDB containers. + Not set by default. + + Example: `3.5` + EOT + + default = "" +} diff --git a/deploy/infrastructure/utils/definitions/crdb_cpu_request.tf b/deploy/infrastructure/utils/definitions/crdb_cpu_request.tf new file mode 100644 index 000000000..9ea9f2f5b --- /dev/null +++ b/deploy/infrastructure/utils/definitions/crdb_cpu_request.tf @@ -0,0 +1,11 @@ +variable "crdb_cpu_request" { + type = string + description = <<-EOT + Kubernetes CPU request of the CockroachDB containers. + Not set by default. + + Example: `3.5` + EOT + + default = "" +} diff --git a/deploy/infrastructure/utils/definitions/crdb_memory_limit.tf b/deploy/infrastructure/utils/definitions/crdb_memory_limit.tf new file mode 100644 index 000000000..1fcfe8af6 --- /dev/null +++ b/deploy/infrastructure/utils/definitions/crdb_memory_limit.tf @@ -0,0 +1,11 @@ +variable "crdb_memory_limit" { + type = string + description = <<-EOT + Kubernetes memory limit of the CockroachDB containers. + Not set by default. + + Example: `14Gi` + EOT + + default = "" +} diff --git a/deploy/infrastructure/utils/definitions/crdb_memory_request.tf b/deploy/infrastructure/utils/definitions/crdb_memory_request.tf new file mode 100644 index 000000000..106f6b17a --- /dev/null +++ b/deploy/infrastructure/utils/definitions/crdb_memory_request.tf @@ -0,0 +1,11 @@ +variable "crdb_memory_request" { + type = string + description = <<-EOT + Kubernetes memory request of the CockroachDB containers. + Not set by default. + + Example: `14Gi` + EOT + + default = "" +} diff --git a/deploy/infrastructure/utils/variables.py b/deploy/infrastructure/utils/variables.py index 1fd84edb9..f3b903b57 100755 --- a/deploy/infrastructure/utils/variables.py +++ b/deploy/infrastructure/utils/variables.py @@ -50,6 +50,14 @@ "crdb_cluster_name", "crdb_cache", "crdb_max_sql_memory", + "crdb_cpu_request", + "crdb_memory_request", + "crdb_cpu_limit", + "crdb_memory_limit", + "core_service_cpu_request", + "core_service_memory_request", + "core_service_cpu_limit", + "core_service_memory_limit", "locality", "datastore_max_open_conns", "crdb_external_nodes", diff --git a/deploy/operations/ci/aws-1/variables.gen.tf b/deploy/operations/ci/aws-1/variables.gen.tf index d0787d597..ec2d0daa8 100644 --- a/deploy/operations/ci/aws-1/variables.gen.tf +++ b/deploy/operations/ci/aws-1/variables.gen.tf @@ -459,6 +459,110 @@ variable "crdb_max_sql_memory" { } +variable "crdb_cpu_request" { + type = string + description = <<-EOT + Kubernetes CPU request of the CockroachDB containers. + Not set by default. + + Example: `3.5` + EOT + + default = "" +} + + +variable "crdb_memory_request" { + type = string + description = <<-EOT + Kubernetes memory request of the CockroachDB containers. + Not set by default. + + Example: `14Gi` + EOT + + default = "" +} + + +variable "crdb_cpu_limit" { + type = string + description = <<-EOT + Kubernetes CPU limit of the CockroachDB containers. + Not set by default. + + Example: `3.5` + EOT + + default = "" +} + + +variable "crdb_memory_limit" { + type = string + description = <<-EOT + Kubernetes memory limit of the CockroachDB containers. + Not set by default. + + Example: `14Gi` + EOT + + default = "" +} + + +variable "core_service_cpu_request" { + type = string + description = <<-EOT + Kubernetes CPU request of the core-service containers. + Not set by default. + + Example: `0.5` + EOT + + default = "" +} + + +variable "core_service_memory_request" { + type = string + description = <<-EOT + Kubernetes memory request of the core-service containers. + Not set by default. + + Example: `2Gi` + EOT + + default = "" +} + + +variable "core_service_cpu_limit" { + type = string + description = <<-EOT + Kubernetes CPU limit of the core-service containers. + Not set by default. + + Example: `1` + EOT + + default = "" +} + + +variable "core_service_memory_limit" { + type = string + description = <<-EOT + Kubernetes memory limit of the core-service containers. + Not set by default. + + Example: `2Gi` + EOT + + default = "" +} + + variable "locality" { type = string description = <<-EOT diff --git a/deploy/services/helm-charts/dss/templates/dss-core-service.yaml b/deploy/services/helm-charts/dss/templates/dss-core-service.yaml index 9902a46ff..f4bc2e59e 100644 --- a/deploy/services/helm-charts/dss/templates/dss-core-service.yaml +++ b/deploy/services/helm-charts/dss/templates/dss-core-service.yaml @@ -92,6 +92,27 @@ spec: {{- end }} command: - core-service + {{- if or $dss.cpuRequest $dss.memoryRequest $dss.cpuLimit $dss.memoryLimit }} + resources: + {{- if or $dss.cpuRequest $dss.memoryRequest }} + requests: + {{- with $dss.cpuRequest }} + cpu: {{ . | quote }} + {{- end }} + {{- with $dss.memoryRequest }} + memory: {{ . | quote }} + {{- end }} + {{- end }} + {{- if or $dss.cpuLimit $dss.memoryLimit }} + limits: + {{- with $dss.cpuLimit }} + cpu: {{ . | quote }} + {{- end }} + {{- with $dss.memoryLimit }} + memory: {{ . | quote }} + {{- end }} + {{- end }} + {{- end }} image: {{ $dss.image }} imagePullPolicy: {{ $dss.imagePullPolicy | default "Always" }} name: core-service diff --git a/deploy/services/helm-charts/dss/values.schema.json b/deploy/services/helm-charts/dss/values.schema.json index 5e9fa6401..fd0afa4d9 100644 --- a/deploy/services/helm-charts/dss/values.schema.json +++ b/deploy/services/helm-charts/dss/values.schema.json @@ -242,6 +242,22 @@ "type": "string", "description": "Image of the DSS. Please note that the usage of the `latest` tag is discouraged to prevent accidental upgrades in case of restart. Example: `docker.io/interuss/dss:v0.15.0`. Official image releases: https://hub.docker.com/r/interuss/dss/tags" }, + "cpuRequest": { + "type": "string", + "description": "Kubernetes CPU request of the core-service containers. Not set if empty. Example: `0.5`" + }, + "memoryRequest": { + "type": "string", + "description": "Kubernetes memory request of the core-service containers. Not set if empty. Example: `2Gi`" + }, + "cpuLimit": { + "type": "string", + "description": "Kubernetes CPU limit of the core-service containers. Not set if empty. Example: `1`" + }, + "memoryLimit": { + "type": "string", + "description": "Kubernetes memory limit of the core-service containers. Not set if empty. Example: `2Gi`" + }, "conf": { "type": "object", "properties": { diff --git a/deploy/services/tanka/cockroachdb.libsonnet b/deploy/services/tanka/cockroachdb.libsonnet index 6788e3d47..2bcd6f544 100644 --- a/deploy/services/tanka/cockroachdb.libsonnet +++ b/deploy/services/tanka/cockroachdb.libsonnet @@ -55,6 +55,7 @@ local volumes = import 'volumes.libsonnet'; value: 'kubernetes-multiregion', }, ], + resources: util.resources(metadata.cockroach), livenessProbe: { httpGet: { path: '/health', diff --git a/deploy/services/tanka/core-service.libsonnet b/deploy/services/tanka/core-service.libsonnet index fd3bf56a5..8fd0fe0b2 100644 --- a/deploy/services/tanka/core-service.libsonnet +++ b/deploy/services/tanka/core-service.libsonnet @@ -1,4 +1,5 @@ local base = import 'base.libsonnet'; +local util = import 'util.libsonnet'; local volumes = import 'volumes.libsonnet'; local datastoreparameters = import 'datastoreparameters.libsonnet'; @@ -118,6 +119,7 @@ local awsLoadBalancer(metadata) = base.AWSLoadBalancerWithManagedCert(metadata, }, ] else [], volumeMounts: volumes.all(metadata).backendMounts, + resources: util.resources(metadata.backend), command: ['core-service'], args_:: { addr: ':' + metadata.backend.port, diff --git a/deploy/services/tanka/metadata_base.libsonnet b/deploy/services/tanka/metadata_base.libsonnet index 1f9d1ca76..b13c1e2b7 100644 --- a/deploy/services/tanka/metadata_base.libsonnet +++ b/deploy/services/tanka/metadata_base.libsonnet @@ -27,6 +27,11 @@ clusterName: '', cache: '25%', // Value of the --cache flag of `cockroach start` maxSqlMemory: '25%', // Value of the --max-sql-memory flag of `cockroach start` + // Kubernetes container resources, e.g. '3.5' CPU and '14Gi' memory. Not set if empty. + cpuRequest: '', + memoryRequest: '', + cpuLimit: '', + memoryLimit: '', }, yugabyte: { image: error 'must specify yugabyte db image', @@ -69,6 +74,11 @@ dumpRequests: false, certName: if $.cloud_provider == "aws" then error 'must specify certName for AWS cloud provider', # Only used by AWS sslPolicy: '', # SSL Policy Name. Only used by Google Cloud. + // Kubernetes container resources, e.g. '0.5' CPU and '2Gi' memory. Not set if empty. + cpuRequest: '', + memoryRequest: '', + cpuLimit: '', + memoryLimit: '', }, alert: { enable: false, diff --git a/deploy/services/tanka/util.libsonnet b/deploy/services/tanka/util.libsonnet index 6ce375fb6..838551529 100644 --- a/deploy/services/tanka/util.libsonnet +++ b/deploy/services/tanka/util.libsonnet @@ -4,5 +4,13 @@ objectItems(o): [[k, o[k]] for k in std.objectFields(o)], filter(o, fields): { [field]: o[field] for field in std.setInter(std.objectFields(o), fields) }, exclude(o, fields): { [field]: o[field] for field in std.setDiff(std.objectFields(o), fields) }, - makeArgs(o): ['--%s=%s' % kv for kv in $.objectItems(o)] + makeArgs(o): ['--%s=%s' % kv for kv in $.objectItems(o)], + // Kubernetes container resources from the cpuRequest, memoryRequest, cpuLimit and memoryLimit fields of o, without the empty ones. + resources(o): + local requests = { [r]: o[r + 'Request'] for r in ['cpu', 'memory'] if o[r + 'Request'] != '' }; + local limits = { [r]: o[r + 'Limit'] for r in ['cpu', 'memory'] if o[r + 'Limit'] != '' }; + { + [if requests != {} then 'requests']: requests, + [if limits != {} then 'limits']: limits, + }, } \ No newline at end of file diff --git a/docs/operations/performance.md b/docs/operations/performance.md index bb06ccda4..43cf5f924 100644 --- a/docs/operations/performance.md +++ b/docs/operations/performance.md @@ -8,8 +8,12 @@ See the detailed [section about cleanup](cleanup.md). ## CPU and memory allocation +By default, the deployment tooling does not set any Kubernetes CPU or memory requests or limits on the CockroachDB and core-service containers. +Kubernetes may then place them on nodes without enough free memory and kill them when the node runs out of memory (see issue [#1731](https://github.com/interuss/dss/issues/1731)). + The following settings are available: +* CPU and memory requests and limits of the CockroachDB and core-service containers. * CockroachDB `--cache` and `--max-sql-memory` flags (both `25%` by default). See [CockroachDB recommendations](https://www.cockroachlabs.com/docs/stable/recommended-production-settings#cache-and-sql-memory-size) before changing them. To set them: @@ -19,7 +23,11 @@ To set them: === "Terraform" Set the following variables (see `TFVARS.gen.md` for details): + * `crdb_cpu_request`, `crdb_memory_request`, `crdb_cpu_limit` and `crdb_memory_limit`, e.g. `"3.5"` and `"14Gi"` * `crdb_cache` and `crdb_max_sql_memory`, e.g. `"25%"` + * `core_service_cpu_request`, `core_service_memory_request`, `core_service_cpu_limit` and `core_service_memory_limit`, e.g. `"0.5"` and `"2Gi"` + + CPU and memory requests and limits left empty are not set on the containers. Then run `terraform apply` to regenerate the Tanka and Helm configuration. @@ -28,11 +36,22 @@ To set them: ```jsonnet cockroach+: { + cpuRequest: '3.5', + memoryRequest: '14Gi', + cpuLimit: '3.5', + memoryLimit: '14Gi', cache: '25%', maxSqlMemory: '25%', }, + backend+: { + cpuRequest: '0.5', + memoryRequest: '2Gi', + memoryLimit: '2Gi', + }, ``` + CPU and memory requests and limits left empty are not set on the containers. + === "Helm" Set the following values: @@ -41,8 +60,17 @@ To set them: conf: cache: 25% max-sql-memory: 25% + statefulset: + resources: {requests: {cpu: "3.5", memory: 14Gi}, limits: {cpu: "3.5", memory: 14Gi}} + dss: + cpuRequest: "0.5" + memoryRequest: 2Gi + memoryLimit: 2Gi ``` + CockroachDB resources are set with `statefulset.resources` of the [official CockroachDB chart](https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/values.yaml). + Core-service CPU and memory requests and limits left empty are not set on the containers. + ## The SCD global lock option !!! danger From 2abb0686e111145438b083c8af70260eec24f52f Mon Sep 17 00:00:00 2001 From: Mariem Baccaristring)Kubernetes CPU limit of the core-service containers. Not set by default.
-Example: 1
Example: 0.5
""string)string)Kubernetes CPU limit of the core-service containers. Not set by default.
-Example: 1
Example: 0.5
""string)