Chart: opt-in service account and pod labels (backport to r8.0) - #305
Conversation
* feat(chart): opt-in serviceAccount.name and podLabels serviceAccount.name renders serviceAccountName on the pod spec. podLabels adds labels to the pod template only, never the selector, with every value quoted. Both are empty by default, so the default render is byte-identical to before. This lets a release run as an existing ServiceAccount bound to an Azure Workload Identity (serviceAccount.name plus the azure.workload.identity/use pod label) without a Helm post-renderer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Umepkp3PVYEjJSi9v3j9Xs * fix(chart): quote serviceAccountName and reject reserved podLabels keys A numeric-looking ServiceAccount name such as 123 rendered as a YAML integer, which the API rejects. The podLabels keys app, draft and release duplicated the chart's own pod labels without any render or lint error. app and release are also the selector labels. The chart now fails with a clear message instead. The podLabels examples now quote the --set argument, so the escaped dots survive the shell. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Umepkp3PVYEjJSi9v3j9Xs --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit 7f93814)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (8)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: simplify9/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
This backports #303 to
releases/r8.0. It's agit cherry-pick -xof the merged commit7f93814, with the same three files and the same change. Two opt-in values are added to thebitweenchart:serviceAccount.name''serviceAccountNameon the pod spec, quoted. The chart doesn't create the ServiceAccount.podLabels{}app,draftandreleaseare rejected.Both are empty by default, so nothing changes for anyone who doesn't set them.
Why
GIG runs bitween on the 8.1 line:
bitween-8.1.64. This was checked withhelm list -n autopartson the staging cluster.8.1.65. This is inferred from the chart index: it's the version their last unpinned deploy would have pulled on 2026-08-06, before 10.0.0 existed.The chart version is also the app version, because the image tag is
.Chart.Version. So moving GIG's deploy onto the org'shelm-deploy-values.ymlwithout a major 8.1 → 10.0 app upgrade needs an 8.1 chart with these values. Today, GIG gets the service account and label from a Python--post-rendereron Helm 3.12, and Helm 4 only accepts post-renderer plugins.Verification
The patch applies cleanly. The cherry-pick has no conflicts. The only other chart difference between r8.0 and r10.0 is comments and the
$rootfix in the extra-secrets loop, which this doesn't touch.The tests pass on the r8.0 chart. All of Chart: opt-in service account and pod labels #303's render tests pass (13 of 13) on this branch. The untouched r8.0 chart fails the 8 new-feature cases, as expected.
Default output is unchanged. With nothing set, the render is byte-identical to the untouched r8.0 chart, in both ingress and Gateway API mode.
The only change since GIG's version is this one.
charts/defaulthasn't changed on r8.0 since GIG's8.1.64.End-to-end GIG check. GIG staging's values were rendered two ways:
8.1.64chart, piped through its real post-renderer, with fake secrets of the same shapehelm-deploy-values.ymland thehelm-deployaction, using this branch's chartThe two renders are semantically identical across the Secret, Service, Deployment and Ingress.
Release impact
releases/r8.0runs the r8.0 release, which publishes the next8.1.xchart and image.playground. That's the samebitweenrelease onapp-dev.bitween.iothat the r10.0 pipeline deploys, so playground runs 8.1.x until the next r10.0 push. Every r8.0 push already does this.Rollback
Revert this commit.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Umepkp3PVYEjJSi9v3j9Xs