Repository navigation
feat/labels: Add labels to PVCs, ServiceAccounts, and RBAC objects - #1008
Draft
marcleblanc2 wants to merge 1 commit into
Draft
marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
marcleblanc2
force-pushed
the
marc/pvc-serviceaccount-labels
branch
from
November 11, 2026 17:45
3d258bf to
aaffaa9
Compare
marcleblanc2
force-pushed
the
marc/pvc-serviceaccount-labels
branch
from
November 11, 2026 22:59
679ac13 to
7e6b950
Compare
This was referenced Nov 12, 2026
marcleblanc2
added a commit
that referenced
this pull request
Nov 13, 2026
Prometheus does not reload a changed ConfigMap by itself, so an upgrade that keeps the image tag swapped the RBAC resources while the pod kept running the old scrape configuration. The annotation, its test, and the changelog entry are the same as in #1008.
marcleblanc2
force-pushed
the
marc/pvc-serviceaccount-labels
branch
from
November 13, 2026 06:26
6fd1fe2 to
756d760
Compare
marcleblanc2
marked this pull request as draft
November 13, 2026 10:14
marcleblanc2
force-pushed
the
marc/pvc-serviceaccount-labels
branch
from
November 18, 2026 18:09
05bb302 to
71215b0
Compare
This was referenced Nov 18, 2026
marcleblanc2
force-pushed
the
marc/pvc-serviceaccount-labels
branch
2 times, most recently
from
November 18, 2026 20:08
d12bb2f to
42d6937
Compare
Render sourcegraph.labels on the standalone PersistentVolumeClaims, every ServiceAccount, and the prometheus RBAC objects, and add per-component storageLabels and serviceAccount.labels values, so a release that takes over objects created outside the chart can keep the labels they already have. Also fix the jaeger ServiceAccount, which read its name and annotations from a tracing value that does not exist and failed to render. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a1902b-ece9-725c-863d-3e2bba35ee1d
marcleblanc2
force-pushed
the
marc/pvc-serviceaccount-labels
branch
from
November 18, 2026 20:32
42d6937 to
e167670
Compare
This branch has not been deployed
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.
Problem
Solution
<serviceName>.storageLabelsfor the seven standalone PVCs:blobstore,codeInsightsDB,codeIntelDB,pgsql,prometheus,redisCache,redisStorepreciseCodeIntel.storageLabelsandsyntacticCodeIntel.storageLabelsfor the per-pod scratch PVC whenstorageTypeispvcsourcegraphchart creates now has astorageLabelsvalue<serviceName>.serviceAccount.labelsfor every ServiceAccount, and for the RBAC objects offrontendandprometheussourcegraph.labelsand the standard Helm labels now also render on these objects toostorageLabels, on purpose: Kubernetes rejects changes to those templatesjaeger.serviceAccount.create: true, which failed to render when a label is appliedUpgrade impact
prometheusClusterRole and ClusterRoleBindingTested
tests/objectLabels_test.yamlcovers every PVC, ServiceAccount, and RBAC template. The two code intel storage tests cover the scratch PVChelm unittest(274 tests),helm lint, helm-docs, andkubeconform -strictpassmain: only those object kinds differ, and no PVC spec changesstorageType: pvc: the same output as before untilstorageLabelsis set, then only the scratch PVC's labels differAmp threads
Changelog
<serviceName>.storageLabelsand<serviceName>.serviceAccount.labelssourcegraph.labelsand the standard Helm labels are now on PVCs, ServiceAccounts, and theprometheusRBAC objects