diff --git a/charts/sourcegraph-executor/k8s/README.md b/charts/sourcegraph-executor/k8s/README.md index 67bae6cc3..d4ca01001 100644 --- a/charts/sourcegraph-executor/k8s/README.md +++ b/charts/sourcegraph-executor/k8s/README.md @@ -69,31 +69,38 @@ In addition to the documented values, the `executor` and `private-docker-registr | executor.image.defaultTag | string | `@sha256:`, pinned by each release | Docker image tag for the `executor-kubernetes` image | | executor.image.name | string | `"executor-kubernetes"` | | | executor.kubeconfigPath | string | `""` | The path to the kubeconfig file. If not specified, the in-cluster config is used. | +| executor.kubernetesClient.burst | int | `100`, the executor's default | The maximum burst of queries from each executor pod to the Kubernetes API, above `qps`. | +| executor.kubernetesClient.qps | number | `50`, the executor's default | The maximum queries per second from each executor pod to the Kubernetes API, shared by all of its jobs. Each job makes about 10 API calls. | +| executor.kubernetesJob.containerSecurityContext | object | `{}` | Security context for job containers, as YAML. e.g. set `allowPrivilegeEscalation: false`, `capabilities: {drop: [ALL]}`, and `seccompProfile: {type: RuntimeDefault}` for Pod Security Admission `restricted` namespaces. | | executor.kubernetesJob.deadline | string | `"1200"` | The number of seconds after which a Kubernetes job will be terminated. | | executor.kubernetesJob.fsGroup | string | `"1000"` | The group ID which is set on the job PVC file system. | | executor.kubernetesJob.node.name | string | `""` | The name of the Kubernetes Node to create job pods on. If not specified, the pods are created on the first available node. | -| executor.kubernetesJob.node.requiredAffinityMatchExpressions | string | `""` | The JSON encoded required affinity match expressions for Kubernetes Jobs. e.g. '[{\"key\":\"foo\",\"operator\":\"In\",\"values\":[\"bar\"]}]' | -| executor.kubernetesJob.node.requiredAffinityMatchFields | string | `""` | The JSON encoded required affinity match fields for Kubernetes Jobs. e.g. '[{\"key\":\"foo\",\"operator\":\"In\",\"values\":[\"bar\"]}]' | +| executor.kubernetesJob.node.requiredAffinityMatchExpressions | list | `""` | Required node affinity match expressions for job pods, as a YAML list. e.g. `[{key: foo, operator: In, values: [bar]}]` | +| executor.kubernetesJob.node.requiredAffinityMatchFields | list | `""` | Required node affinity match fields for job pods, as a YAML list. e.g. `[{key: metadata.name, operator: In, values: [node-1]}]` | | executor.kubernetesJob.node.selector | string | `""` | A comma separated list of values to use as a node selector for Kubernetes Jobs. e.g. `foo=bar,app=my-app` | -| executor.kubernetesJob.node.tolerations | string | `""` | The JSON encoded tolerations for Kubernetes Jobs. e.g. '[{\"key\":\"foo\",\"operator\":\"Equal\",\"value\":\"bar\",\"effect\":\"NoSchedule\"}]' | -| executor.kubernetesJob.pod.affinity | string | `""` | The JSON encoded pod affinity for Kubernetes Jobs. e.g. '[{\"labelSelector\": {\"matchExpressions\": [{\"key\": \"foo\",\"operator\": \"In\",\"values\": [\"bar\"]}]},\"topologyKey\": \"kubernetes.io/hostname\"}]' | -| executor.kubernetesJob.pod.antiAffinity | string | `""` | The JSON encoded pod anti-affinity for Kubernetes Jobs. e.g. '[{\"labelSelector\": {\"matchExpressions\": [{\"key\": \"foo\",\"operator\": \"In\",\"values\": [\"bar\"]}]},\"topologyKey\": \"kubernetes.io/hostname\"}]' | +| executor.kubernetesJob.node.tolerations | list | `""` | Tolerations for job pods, as a YAML list. e.g. `[{key: foo, operator: Equal, value: bar, effect: NoSchedule}]` | +| executor.kubernetesJob.pod.affinity | list | `""` | Required pod affinity terms for job pods, as a YAML list. e.g. `[{labelSelector: {matchExpressions: [{key: foo, operator: In, values: [bar]}]}, topologyKey: kubernetes.io/hostname}]` | +| executor.kubernetesJob.pod.antiAffinity | list | `""` | Required pod anti-affinity terms for job pods, as a YAML list. e.g. `[{labelSelector: {matchExpressions: [{key: foo, operator: In, values: [bar]}]}, topologyKey: kubernetes.io/hostname}]` | +| executor.kubernetesJob.podSecurityContext | object | `{}` | Security context for job pods, as YAML. When set, it replaces `runAsUser`, `runAsGroup`, and `fsGroup`. learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) | | executor.kubernetesJob.resources.limits.cpu | string | `""` | The maximum CPU for a job. | +| executor.kubernetesJob.resources.limits.ephemeralStorage | string | `""` | The maximum ephemeral storage for a job. | | executor.kubernetesJob.resources.limits.memory | string | `"12Gi"` | The maximum memory for a job. | | executor.kubernetesJob.resources.requests.cpu | string | `""` | The requested CPU for a job. | +| executor.kubernetesJob.resources.requests.ephemeralStorage | string | `""` | The requested ephemeral storage for a job. With the default `emptyDir` job volume, set this to at least the job volume size (`KUBERNETES_JOB_VOLUME_SIZE`, default `5Gi`), so the scheduler counts the job volume against the node's disk. | | executor.kubernetesJob.resources.requests.memory | string | `"1Gi"` | The requested memory for a job. | | executor.kubernetesJob.runAsGroup | int | `nil`; accepts [0, 2147483647] | The group ID to run Kubernetes jobs as. | | executor.kubernetesJob.runAsUser | int | `nil`; accepts [0, 2147483647] | The user ID to run Kubernetes jobs as. | | executor.log.format | string | `"condensed"` | | | executor.log.level | string | `"warn"` | Possible values are `dbug`, `info`, `warn`, `eror`, `crit`. | | executor.log.trace | string | `"false"` | | -| executor.maximumNumJobs | int | `10` | The maximum amount of jobs that can be executed concurrently. | +| executor.maximumNumJobs | int | `10` | The maximum amount of jobs that each executor pod can execute concurrently. | | executor.maximumRuntimePerJob | string | `"30m"` | | | executor.namespace | string | `"default"` | The namespace in which jobs are generated by the executor. | | executor.nodeSelector | object | `{}` | NodeSelector, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) | | executor.podSecurityContext | object | `{}` | Security context for the pod, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) | | executor.queueName | string | `""` | The name of the queue to pull jobs from to. Possible values: batches and codeintel. **Either this or queueNames is required.** | | executor.queueNames | list | `[]` | The names of multiple queues to pull jobs from to. Possible values: batches and codeintel. **Either this or queueName is required.** | +| executor.replicas | int | `1` | Number of executor pods. Each pod dequeues jobs from the same queues and runs up to `maximumNumJobs` of them, so the most jobs that run at once is `replicas` x `maximumNumJobs`. Each pod has its own Kubernetes API rate limit (`kubernetesClient`). | | executor.resources.limits.cpu | string | `"1"` | | | executor.resources.limits.memory | string | `"4Gi"` | | | executor.resources.requests.cpu | string | `"500m"` | | diff --git a/charts/sourcegraph-executor/k8s/templates/_helpers.tpl b/charts/sourcegraph-executor/k8s/templates/_helpers.tpl index 70f75b28c..a0267659e 100644 --- a/charts/sourcegraph-executor/k8s/templates/_helpers.tpl +++ b/charts/sourcegraph-executor/k8s/templates/_helpers.tpl @@ -112,3 +112,15 @@ deploy: sourcegraph sourcegraph-resource-requires: no-cluster-admin app.kubernetes.io/component: executor {{- end}} + +{{/* +Renders a JSON-encoded ConfigMap value. Lists and maps are encoded with toJson. +Strings are inserted as before, so existing overrides with escaped JSON keep working. +*/}} +{{- define "executor.jsonValue" -}} +{{- if kindIs "string" . -}} +"{{ . }}" +{{- else -}} +{{ toJson . | quote }} +{{- end -}} +{{- end }} diff --git a/charts/sourcegraph-executor/k8s/templates/executor.ConfigMap.yaml b/charts/sourcegraph-executor/k8s/templates/executor.ConfigMap.yaml index 6e773607b..5098158a9 100644 --- a/charts/sourcegraph-executor/k8s/templates/executor.ConfigMap.yaml +++ b/charts/sourcegraph-executor/k8s/templates/executor.ConfigMap.yaml @@ -18,25 +18,43 @@ data: EXECUTOR_KUBERNETES_NAMESPACE: "{{ .Values.executor.namespace }}" EXECUTOR_KUBERNETES_CONFIG_PATH: "{{ .Values.executor.kubeconfigPath }}" + {{- with .Values.executor.kubernetesClient.qps }} + EXECUTOR_KUBERNETES_CLIENT_QPS: {{ . | quote }} + {{- end }} + {{- with .Values.executor.kubernetesClient.burst }} + EXECUTOR_KUBERNETES_CLIENT_BURST: {{ . | quote }} + {{- end }} EXECUTOR_KUBERNETES_NODE_NAME: "{{ .Values.executor.kubernetesJob.node.name }}" EXECUTOR_KUBERNETES_NODE_SELECTOR: "{{ .Values.executor.kubernetesJob.node.selector }}" - EXECUTOR_KUBERNETES_NODE_TOLERATIONS: "{{ .Values.executor.kubernetesJob.node.tolerations }}" - EXECUTOR_KUBERNETES_NODE_REQUIRED_AFFINITY_MATCH_EXPRESSIONS: "{{ .Values.executor.kubernetesJob.node.requiredAffinityMatchExpressions }}" - EXECUTOR_KUBERNETES_NODE_REQUIRED_AFFINITY_MATCH_FIELDS: "{{ .Values.executor.kubernetesJob.node.requiredAffinityMatchFields }}" + EXECUTOR_KUBERNETES_NODE_TOLERATIONS: {{ include "executor.jsonValue" .Values.executor.kubernetesJob.node.tolerations }} + EXECUTOR_KUBERNETES_NODE_REQUIRED_AFFINITY_MATCH_EXPRESSIONS: {{ include "executor.jsonValue" .Values.executor.kubernetesJob.node.requiredAffinityMatchExpressions }} + EXECUTOR_KUBERNETES_NODE_REQUIRED_AFFINITY_MATCH_FIELDS: {{ include "executor.jsonValue" .Values.executor.kubernetesJob.node.requiredAffinityMatchFields }} - EXECUTOR_KUBERNETES_POD_AFFINITY: "{{ .Values.executor.kubernetesJob.pod.affinity }}" - EXECUTOR_KUBERNETES_POD_ANTI_AFFINITY: "{{ .Values.executor.kubernetesJob.pod.antiAffinity }}" + EXECUTOR_KUBERNETES_POD_AFFINITY: {{ include "executor.jsonValue" .Values.executor.kubernetesJob.pod.affinity }} + EXECUTOR_KUBERNETES_POD_ANTI_AFFINITY: {{ include "executor.jsonValue" .Values.executor.kubernetesJob.pod.antiAffinity }} EXECUTOR_KUBERNETES_RESOURCE_REQUEST_CPU: "{{ .Values.executor.kubernetesJob.resources.requests.cpu }}" EXECUTOR_KUBERNETES_RESOURCE_REQUEST_MEMORY: "{{ .Values.executor.kubernetesJob.resources.requests.memory }}" EXECUTOR_KUBERNETES_RESOURCE_LIMIT_CPU: "{{ .Values.executor.kubernetesJob.resources.limits.cpu }}" EXECUTOR_KUBERNETES_RESOURCE_LIMIT_MEMORY: "{{ .Values.executor.kubernetesJob.resources.limits.memory }}" + {{- with .Values.executor.kubernetesJob.resources.requests.ephemeralStorage }} + EXECUTOR_KUBERNETES_RESOURCE_REQUEST_EPHEMERAL_STORAGE: {{ . | quote }} + {{- end }} + {{- with .Values.executor.kubernetesJob.resources.limits.ephemeralStorage }} + EXECUTOR_KUBERNETES_RESOURCE_LIMIT_EPHEMERAL_STORAGE: {{ . | quote }} + {{- end }} KUBERNETES_JOB_DEADLINE: "{{ .Values.executor.kubernetesJob.deadline }}" KUBERNETES_RUN_AS_USER: "{{ .Values.executor.kubernetesJob.runAsUser }}" KUBERNETES_RUN_AS_GROUP: "{{ .Values.executor.kubernetesJob.runAsGroup }}" KUBERNETES_FS_GROUP: "{{ .Values.executor.kubernetesJob.fsGroup }}" + {{- with .Values.executor.kubernetesJob.podSecurityContext }} + KUBERNETES_EXECUTOR_POD_SECURITY_CONTEXT: {{ toJson . | quote }} + {{- end }} + {{- with .Values.executor.kubernetesJob.containerSecurityContext }} + KUBERNETES_EXECUTOR_CONTAINER_SECURITY_CONTEXT: {{ toJson . | quote }} + {{- end }} EXECUTOR_DOCKER_ADD_HOST_GATEWAY: "{{.Values.executor.dockerAddHostGateway }}" KUBERNETES_KEEP_JOBS: "{{ .Values.executor.debug.keepJobs }}" diff --git a/charts/sourcegraph-executor/k8s/templates/executor.Deployment.yaml b/charts/sourcegraph-executor/k8s/templates/executor.Deployment.yaml index 1cb35d2c4..1dbd4d48d 100644 --- a/charts/sourcegraph-executor/k8s/templates/executor.Deployment.yaml +++ b/charts/sourcegraph-executor/k8s/templates/executor.Deployment.yaml @@ -16,10 +16,7 @@ spec: {{- include "sourcegraph.selectorLabels" . | nindent 6 }} app: {{ include "executor.name" . }} minReadySeconds: 10 - # The executor controller is a singleton: it pins Job pods to its own node - # via EXECUTOR_KUBERNETES_NODE_NAME, so running more than one replica does not - # work (replicas contend for the same ReadWriteOnce PVC). Do not make this configurable. - replicas: 1 + replicas: {{ .Values.executor.replicas }} revisionHistoryLimit: 10 strategy: rollingUpdate: diff --git a/charts/sourcegraph-executor/k8s/tests/executor_test.yaml b/charts/sourcegraph-executor/k8s/tests/executor_test.yaml index 256638deb..fe40006f5 100644 --- a/charts/sourcegraph-executor/k8s/tests/executor_test.yaml +++ b/charts/sourcegraph-executor/k8s/tests/executor_test.yaml @@ -125,3 +125,111 @@ tests: path: spec.template.spec.securityContext.runAsUser - isNull: path: spec.template.spec.securityContext.runAsGroup + + - it: should render executor.replicas + template: executor.Deployment.yaml + set: + executor: + queueName: "test" + replicas: 3 + asserts: + - equal: + path: spec.replicas + value: 3 + + - it: should leave Kubernetes client limits and ephemeral storage to the executor's defaults when unset + template: executor.ConfigMap.yaml + set: + executor: + queueName: "test" + asserts: + - notExists: + path: data.EXECUTOR_KUBERNETES_CLIENT_QPS + - notExists: + path: data.EXECUTOR_KUBERNETES_CLIENT_BURST + - notExists: + path: data.EXECUTOR_KUBERNETES_RESOURCE_REQUEST_EPHEMERAL_STORAGE + - notExists: + path: data.EXECUTOR_KUBERNETES_RESOURCE_LIMIT_EPHEMERAL_STORAGE + + - it: should render Kubernetes client limits and ephemeral storage when set + template: executor.ConfigMap.yaml + set: + executor: + queueName: "test" + kubernetesClient: + qps: 12.5 + burst: 25 + kubernetesJob: + resources: + requests: + ephemeralStorage: 6Gi + limits: + ephemeralStorage: 8Gi + asserts: + - equal: + path: data.EXECUTOR_KUBERNETES_CLIENT_QPS + value: "12.5" + - equal: + path: data.EXECUTOR_KUBERNETES_CLIENT_BURST + value: "25" + - equal: + path: data.EXECUTOR_KUBERNETES_RESOURCE_REQUEST_EPHEMERAL_STORAGE + value: 6Gi + - equal: + path: data.EXECUTOR_KUBERNETES_RESOURCE_LIMIT_EPHEMERAL_STORAGE + value: 8Gi + + - it: should render job scheduling and security contexts given as YAML as JSON + template: executor.ConfigMap.yaml + set: + executor: + queueName: "test" + kubernetesJob: + podSecurityContext: + runAsNonRoot: true + fsGroup: 1000 + containerSecurityContext: + allowPrivilegeEscalation: false + capabilities: + drop: [ALL] + node: + tolerations: + - key: dedicated + operator: Equal + value: executor-jobs + effect: NoSchedule + pod: + antiAffinity: + - labelSelector: + matchLabels: + app: foo + topologyKey: kubernetes.io/hostname + asserts: + - equal: + path: data.KUBERNETES_EXECUTOR_POD_SECURITY_CONTEXT + value: '{"fsGroup":1000,"runAsNonRoot":true}' + - equal: + path: data.KUBERNETES_EXECUTOR_CONTAINER_SECURITY_CONTEXT + value: '{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}' + - equal: + path: data.EXECUTOR_KUBERNETES_NODE_TOLERATIONS + value: '[{"effect":"NoSchedule","key":"dedicated","operator":"Equal","value":"executor-jobs"}]' + - equal: + path: data.EXECUTOR_KUBERNETES_POD_ANTI_AFFINITY + value: '[{"labelSelector":{"matchLabels":{"app":"foo"}},"topologyKey":"kubernetes.io/hostname"}]' + + - it: should still accept escaped JSON strings for job scheduling values + template: executor.ConfigMap.yaml + set: + executor: + queueName: "test" + kubernetesJob: + node: + tolerations: '[{\"key\":\"dedicated\",\"operator\":\"Exists\"}]' + asserts: + - equal: + path: data.EXECUTOR_KUBERNETES_NODE_TOLERATIONS + value: '[{"key":"dedicated","operator":"Exists"}]' + - notExists: + path: data.KUBERNETES_EXECUTOR_POD_SECURITY_CONTEXT diff --git a/charts/sourcegraph-executor/k8s/values.yaml b/charts/sourcegraph-executor/k8s/values.yaml index b55767725..bb400fc8b 100644 --- a/charts/sourcegraph-executor/k8s/values.yaml +++ b/charts/sourcegraph-executor/k8s/values.yaml @@ -66,7 +66,10 @@ executor: queueName: "" # -- The names of multiple queues to pull jobs from to. Possible values: batches and codeintel. **Either this or queueName is required.** queueNames: [ ] - # -- The maximum amount of jobs that can be executed concurrently. + # -- Number of executor pods. Each pod dequeues jobs from the same queues and runs up to `maximumNumJobs` of them, + # so the most jobs that run at once is `replicas` x `maximumNumJobs`. Each pod has its own Kubernetes API rate limit (`kubernetesClient`). + replicas: 1 + # -- The maximum amount of jobs that each executor pod can execute concurrently. maximumNumJobs: 10 # - The maximum wall time that can be spent on a single job. maximumRuntimePerJob: "30m" @@ -81,6 +84,13 @@ executor: namespace: "default" # -- The path to the kubeconfig file. If not specified, the in-cluster config is used. kubeconfigPath: "" + kubernetesClient: + # -- (number) The maximum queries per second from each executor pod to the Kubernetes API, shared by all of its jobs. Each job makes about 10 API calls. + # @default -- `50`, the executor's default + qps: + # -- (int) The maximum burst of queries from each executor pod to the Kubernetes API, above `qps`. + # @default -- `100`, the executor's default + burst: # -- DEPRECATED: Use `executor.containerSecurityContext` or `executor.podSecurityContext` instead. securityContext: # -- DEPRECATED: Use `executor.containerSecurityContext` or `executor.podSecurityContext` instead. @@ -103,34 +113,45 @@ executor: runAsGroup: # -- The group ID which is set on the job PVC file system. fsGroup: "1000" + # -- Security context for job pods, as YAML. + # When set, it replaces `runAsUser`, `runAsGroup`, and `fsGroup`. + # learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) + podSecurityContext: {} + # -- Security context for job containers, as YAML. + # e.g. set `allowPrivilegeEscalation: false`, `capabilities: {drop: [ALL]}`, and `seccompProfile: {type: RuntimeDefault}` for Pod Security Admission `restricted` namespaces. + containerSecurityContext: {} resources: requests: # -- The requested CPU for a job. cpu: "" # -- The requested memory for a job. memory: "1Gi" + # -- The requested ephemeral storage for a job. With the default `emptyDir` job volume, set this to at least the job volume size (`KUBERNETES_JOB_VOLUME_SIZE`, default `5Gi`), so the scheduler counts the job volume against the node's disk. + ephemeralStorage: "" limits: # -- The maximum CPU for a job. cpu: "" # -- The maximum memory for a job. memory: "12Gi" + # -- The maximum ephemeral storage for a job. + ephemeralStorage: "" node: # -- The name of the Kubernetes Node to create job pods on. If not specified, the pods are created on the first available node. name: "" # -- A comma separated list of values to use as a node selector for Kubernetes Jobs. e.g. `foo=bar,app=my-app` selector: "" - # -- The JSON encoded tolerations for Kubernetes Jobs. e.g. '[{\"key\":\"foo\",\"operator\":\"Equal\",\"value\":\"bar\",\"effect\":\"NoSchedule\"}]' + # -- (list) Tolerations for job pods, as a YAML list. e.g. `[{key: foo, operator: Equal, value: bar, effect: NoSchedule}]` tolerations: "" - # -- The JSON encoded required affinity match expressions for Kubernetes Jobs. e.g. '[{\"key\":\"foo\",\"operator\":\"In\",\"values\":[\"bar\"]}]' + # -- (list) Required node affinity match expressions for job pods, as a YAML list. e.g. `[{key: foo, operator: In, values: [bar]}]` requiredAffinityMatchExpressions: "" - # -- The JSON encoded required affinity match fields for Kubernetes Jobs. e.g. '[{\"key\":\"foo\",\"operator\":\"In\",\"values\":[\"bar\"]}]' + # -- (list) Required node affinity match fields for job pods, as a YAML list. e.g. `[{key: metadata.name, operator: In, values: [node-1]}]` requiredAffinityMatchFields: "" pod: - # -- The JSON encoded pod affinity for Kubernetes Jobs. e.g. '[{\"labelSelector\": {\"matchExpressions\": [{\"key\": \"foo\",\"operator\": \"In\",\"values\": [\"bar\"]}]},\"topologyKey\": \"kubernetes.io/hostname\"}]' + # -- (list) Required pod affinity terms for job pods, as a YAML list. e.g. `[{labelSelector: {matchExpressions: [{key: foo, operator: In, values: [bar]}]}, topologyKey: kubernetes.io/hostname}]` affinity: "" - # -- The JSON encoded pod anti-affinity for Kubernetes Jobs. e.g. '[{\"labelSelector\": {\"matchExpressions\": [{\"key\": \"foo\",\"operator\": \"In\",\"values\": [\"bar\"]}]},\"topologyKey\": \"kubernetes.io/hostname\"}]' + # -- (list) Required pod anti-affinity terms for job pods, as a YAML list. e.g. `[{labelSelector: {matchExpressions: [{key: foo, operator: In, values: [bar]}]}, topologyKey: kubernetes.io/hostname}]` antiAffinity: "" debug: diff --git a/charts/sourcegraph/CHANGELOG.md b/charts/sourcegraph/CHANGELOG.md index a8b444320..596170633 100644 --- a/charts/sourcegraph/CHANGELOG.md +++ b/charts/sourcegraph/CHANGELOG.md @@ -8,6 +8,11 @@ Use `**BREAKING**:` to denote a breaking change ## Unreleased +- Added `executor.replicas` back to the Kubernetes-native executor chart (`sourcegraph-executor/k8s`), default `1`. Executor pods share their queues safely: each dequeues its own jobs, and job pods run on any node with their own workspace volume, so more replicas run more jobs at once, each pod with its own dequeue loop and Kubernetes API rate limit. The earlier claim that the controller is a singleton dated from the removed shared `/data` PVC. +- Added `executor.kubernetesClient.qps` and `executor.kubernetesClient.burst` to the Kubernetes-native executor chart, which set `EXECUTOR_KUBERNETES_CLIENT_QPS` and `EXECUTOR_KUBERNETES_CLIENT_BURST`. Executors before this release used client-go's limit of 5 requests per second, shared by all of an executor pod's jobs, which slowed every job once dozens ran at once. Unset, they keep the executor's defaults. +- Added `executor.kubernetesJob.resources.requests.ephemeralStorage` and `limits.ephemeralStorage` to the Kubernetes-native executor chart, so the scheduler counts each job's `emptyDir` workspace against the node's disk. Unset by default. +- Added `executor.kubernetesJob.podSecurityContext` and `containerSecurityContext` to the Kubernetes-native executor chart, so job pods can run in Pod Security Admission `restricted` namespaces. Unset by default. +- The Kubernetes-native executor chart's `executor.kubernetesJob.node.tolerations`, `requiredAffinityMatchExpressions`, `requiredAffinityMatchFields`, `pod.affinity`, and `pod.antiAffinity` now accept YAML lists. Escaped JSON strings still work. - The `correct-data-dir-permissions` init containers of `pgsql`, `codeintel-db`, and `codeinsights-db` now run the database's own image instead of `sourcegraph/alpine-3.14`, which was based on an end-of-life Alpine release. The chart no longer pulls `alpine-3.14`, so private registries no longer need to mirror it. `alpine.image` has been removed and is ignored if set; `alpine.containerSecurityContext`, `alpine.resources`, and `codeInsightsDB.init.containerSecurityContext` still apply. - Added `sourcegraph.selectorLabelsOverride`, `.extraSelectorLabels`, and `storageLabels` on `gitserver`, `grafana`, `indexedSearch`, and `searcher`, so the chart can render the selectors and volume claim templates of workloads created outside it, such as with Kustomize, and a Helm release can take them over without deleting them. All default to empty, so existing releases render the same selectors. Never change them on an installed release: Kubernetes does not allow changing these fields. See [Adopting existing workloads](README.md#adopting-existing-workloads). - Fixed `frontend.command` and `migrator.command` rendering a list as a single element, e.g. `["sh", "-c", "