Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions charts/sourcegraph-executor/k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ In addition to the documented values, the `executor` and `private-docker-registr
| 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` | |
| executor.resources.limits.cpu | string | `"1"` | |
| executor.resources.limits.memory | string | `"4Gi"` | |
| executor.resources.requests.cpu | string | `"500m"` | |
Expand All @@ -104,7 +103,6 @@ In addition to the documented values, the `executor` and `private-docker-registr
| executor.securityContext.privileged | bool | `false` | DEPRECATED: Use `executor.containerSecurityContext` or `executor.podSecurityContext` instead. |
| executor.securityContext.runAsGroup | string | `nil` | DEPRECATED: Use `executor.containerSecurityContext` or `executor.podSecurityContext` instead. |
| executor.securityContext.runAsUser | string | `nil` | DEPRECATED: Use `executor.containerSecurityContext` or `executor.podSecurityContext` instead. |
| executor.storageSize | string | `"10Gi"` | The storage size of the PVC attached to the executor deployment. |
| executor.tolerations | list | `[]` | Tolerations, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
| sourcegraph.affinity | object | `{}` | Affinity, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) |
| sourcegraph.image.defaultTag | string | `"{{ .Chart.AppVersion }}"` | Global docker image tag |
Expand All @@ -120,9 +118,3 @@ In addition to the documented values, the `executor` and `private-docker-registr
| sourcegraph.podLabels | object | `{}` | Add extra labels to attach to all pods |
| sourcegraph.priorityClassName | string | `""` | Assign a priorityClass to all pods (daemonSets, deployments, and statefulSets) |
| sourcegraph.tolerations | list | `[]` | Tolerations, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
| storageClass.allowedTopologies | object | `{}` | Persistent volumes topology configuration, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#allowed-topologies) |
| storageClass.create | bool | `false` | Enable creation of storageClass. Defaults to Google Cloud Platform. Disable if you have your own existing storage class |
| storageClass.name | string | `"sourcegraph"` | Name of the storageClass. Use to customize to the existing storage class name |
| storageClass.parameters | object | `{}` | Extra parameters of storageClass, consult your cloud provider persistent storage documentation |
| storageClass.provisioner | string | `"kubernetes.io/gce-pd"` | Name of the storageClass provisioner, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner) and consult your cloud provider persistent storage documentation |
| storageClass.type | string | `"pd-ssd"` | Value of `type` key in storageClass `parameters`, consult your cloud provider persistent storage documentation |
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ data:

EXECUTOR_KUBERNETES_NAMESPACE: "{{ .Values.executor.namespace }}"
EXECUTOR_KUBERNETES_CONFIG_PATH: "{{ .Values.executor.kubeconfigPath }}"
EXECUTOR_KUBERNETES_PERSISTENCE_VOLUME_NAME: "sg-{{include "executor.name" . }}"

EXECUTOR_KUBERNETES_NODE_NAME: "{{ .Values.executor.kubernetesJob.node.name }}"
EXECUTOR_KUBERNETES_NODE_SELECTOR: "{{ .Values.executor.kubernetesJob.node.selector }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ spec:
{{- include "sourcegraph.selectorLabels" . | nindent 6 }}
app: {{ include "executor.name" . }}
minReadySeconds: 10
replicas: {{ .Values.executor.replicas }}
# 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
revisionHistoryLimit: 10
strategy:
rollingUpdate:
Expand Down Expand Up @@ -97,9 +100,6 @@ spec:
- -f
- /usr/local/bin/executor
periodSeconds: 5
volumeMounts:
- mountPath: /data
name: "sg-{{include "executor.name" . }}"
terminationMessagePolicy: FallbackToLogsOnError
{{- with .Values.executor.nodeSelector }}
nodeSelector:
Expand All @@ -118,7 +118,3 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: "sg-{{include "executor.name" . }}"
persistentVolumeClaim:
claimName: "sg-{{include "executor.name" . }}"

This file was deleted.

8 changes: 1 addition & 7 deletions charts/sourcegraph-executor/k8s/tests/executor_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ templates:
- executor.Deployment.yaml
- executor.Service.yaml
- executor.ConfigMap.yaml
- executor.PersistentVolumeClaim.yaml
tests:
- it: should render the Deployment, Service, ConfigMap, PVC if executor is enabled
- it: should render the Deployment, Service, ConfigMap if executor is enabled
set:
executor:
queueName: "test"
Expand All @@ -25,11 +24,6 @@ tests:
apiVersion: v1
name: executor-test
template: executor.ConfigMap.yaml
- containsDocument:
kind: PersistentVolumeClaim
apiVersion: v1
name: sg-executor-test
template: executor.PersistentVolumeClaim.yaml

- it: should render default containerSecurityContext with privileged false
template: executor.Deployment.yaml
Expand Down
23 changes: 0 additions & 23 deletions charts/sourcegraph-executor/k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,9 @@ sourcegraph:
priorityClassName: ""


storageClass:
# -- Enable creation of storageClass. Defaults to Google Cloud Platform. Disable if you have your own existing storage class
create: false
# -- Name of the storageClass.
# Use to customize to the existing storage class name
name: sourcegraph
# -- Name of the storageClass provisioner,
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner)
# and consult your cloud provider persistent storage documentation
provisioner: kubernetes.io/gce-pd
# -- Value of `type` key in storageClass `parameters`,
# consult your cloud provider persistent storage documentation
type: pd-ssd
# -- Extra parameters of storageClass,
# consult your cloud provider persistent storage documentation
parameters: { }
# -- Persistent volumes topology configuration,
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#allowed-topologies)
allowedTopologies: { }

executor:
# -- Whether to configure the necessary RBAC resources. Required only once for all executor deployments.
configureRbac: true
replicas: 1
image:
defaultTag: 6.0.0@sha256:6dc771a0c281a41ef676213f2f84a63d99045cf2e58d43022554a8022070ed65
name: "executor-kubernetes"
Expand Down Expand Up @@ -95,8 +74,6 @@ executor:
format: "condensed"
trace: "false"

# -- The storage size of the PVC attached to the executor deployment.
storageSize: 10Gi
# -- The namespace in which jobs are generated by the executor.
namespace: "default"
# -- The path to the kubeconfig file. If not specified, the in-cluster config is used.
Expand Down
2 changes: 2 additions & 0 deletions charts/sourcegraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Use `**BREAKING**:` to denote a breaking change

## Unreleased

- Removed the unused executor controller `/data` PersistentVolumeClaim from the Kubernetes-native executor chart (`sourcegraph-executor/k8s`), along with the now-orphaned `storageClass` and `executor.storageSize` values and the vestigial `EXECUTOR_KUBERNETES_PERSISTENCE_VOLUME_NAME` env var. Since single-job-pod became the only k8s execution mode, job pods use their own ephemeral `emptyDir` volume and the controller writes nothing to `/data`.
- Removed the non-functional `executor.replicas` value from the Kubernetes-native executor chart; the controller is a singleton (it pins Job pods to its own node), so `replicas > 1` never worked.
- Added support for overriding `replicaCount` per dedicated `worker` replica via `worker.replicas[].replicaCount`, falling back to `worker.replicaCount` when unset
- Added support for overriding the image repository on a per-service basis via `<serviceName>.image.repository`, falling back to the global `sourcegraph.image.repository` when unset
- Added livenessProbe to zoekt-webserver in indexed-search to detect and restart hung pods
Expand Down
Loading