executor: remove unused /data PVC and dead replicas value from k8s chart#911
Merged
Merged
Conversation
Remove the executor controller's `/data` PersistentVolumeClaim from the Kubernetes-native executor chart, together with its container volumeMount, pod-spec volume, the orphaned `storageClass`/`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`. Also remove the non-functional `executor.replicas` value: the controller is a singleton that pins Job pods to its own node, so `replicas > 1` never worked (extra replicas contend for the same ReadWriteOnce PVC). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
marcleblanc2
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the executor controller's unused
/dataPersistentVolumeClaim from the Kubernetes-native executor chart (sourcegraph-executor/k8s) — the containervolumeMount, the pod-specvolume, the PVC template, and the now-orphanedstorageClass/executor.storageSizevalues / vestigialEXECUTOR_KUBERNETES_PERSISTENCE_VOLUME_NAMEenv var. Since single-job-pod became the only k8s execution mode (#1163), job pods use their own ephemeralemptyDirat/joband the controller writes nothing to/data. Also removes the non-functionalexecutor.replicasvalue, since the controller is a singleton that pins Job pods to its own node (replicas > 1never worked — extra pods contend for the same ReadWriteOnce PVC). RBAC for job PVCs and the separate firecracker/dind chart are intentionally untouched.Checklist
Test plan
helm lintpasses and all 7helm unittestcases pass.helm templaterenders with nomountPath: /data, no PVC volume/resource, and noPERSISTENCE_VOLUMEenv var.Validated the upgrade path for an existing installation end-to-end on a local kind cluster:
mainchart (with the/dataPVC) → pod1/1 Running, PVCsg-executor-codeintelBound (10Gi RWO), Deployment mounting it at/data.helm upgrade --waitto this branch's chart. Result:deployed(rev 2), rollout succeeded, new pod1/1 Runningwith 0 restarts.DeleteGC'd the PV); the old pod terminated so the PVC finalizer cleared within seconds — no stuckTerminatingresources.volumes/volumeMountsempty; ConfigMap env var removed; no Warning events.Note: on clusters using a
RetainPV reclaim policy, the released PV remains and an admin would delete it manually (the/datavolume held onlylost+foundin k8s mode, so no data loss).Follow-up (not in this PR): the "Job scheduling on Kubernetes" self-hosted docs page still states jobs must co-locate with the executor to share a Persistent Volume — that requirement died with multi-job mode and should be corrected.