Fix ServiceAccount override, add standard labels, document values.yaml - #138
Merged
Conversation
alix-graylog
approved these changes
Jul 30, 2026
alix-graylog
left a comment
Collaborator
There was a problem hiding this comment.
This is great, something we didn't scope out for this milestone, but definitely should have!
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
Chart cleanup with one real bugfix: a bring-your-own ServiceAccount was silently ignored. The rest adds the standard Kubernetes labels to every rendered resource, fails early when required operator CRDs are missing, and fully comments values.yaml.
Details
serviceAccountNamewhenserviceAccount.nameOverrideis set withcreate: false. Previously the guard only checkedcreate, so pods fell back to the namespacedefaultServiceAccount and the override was ignored.graylog.labelshelper, sohelm.sh/chart,app.kubernetes.io/name,instance, andmanaged-byappear on everything the release owns.app.kubernetes.io/componentlabels (server,datanode,mongodb,forwarder,default-backend) next to the legacyapp:labels. No selector was changed, so this is upgrade-safe. The nonstandardapp.kubernetes.io/app-namelabel on the datanode Service is kept and marked deprecated so existing external selectors (ServiceMonitors etc.) keep matching.helm template, helm-unittest) skip the check.Linked issues
Related to #120: the unused datanode persistence fields it describes are now documented as inert in values.yaml, but this PR does not remove or implement them. No issue exists for the ServiceAccount override bug fixed here; it surfaced during review.
PR Checklist
Please check the items that apply to your change.
Testing Checklist
Static Validation
helm lint ./charts/grayloghelm template graylog ./charts/graylog --validateInstallation
helm install graylog ./charts/graylogkubectl rollout status statefulset/grayloghelm test graylogFunctional (if applicable)
Upgrade (if applicable)
Specific to this PR
provider=aws, ingress, and plugins enabled and checked every resulting resource for the chart labels with a small script. I also parsed values.yaml against main to confirm no value changed, and had the diff independently reviewed by a second AI reviewer (OpenAI Codex); its findings are addressed in the review-fix commits.helm testsuites pass, API login with generated credentials works, indexer health green. Two deviations from defaults were needed for the local environment, both now filed as follow-ups:mongodb.version=7.0.25(the CI overlay's 8.0.23 cannot start on Linux kernel 6.19+, upstream SERVER-121912) andgraylog.livenessProbe.enabled=falsefor first boot (the default probe can kill Graylog mid-provisioning and permanently wedge the cluster; needs a startupProbe). The CRD fail-fast check from this PR was also verified live: installing without the operator produces the new actionable error.helm templaterenders fine without a cluster).Notes for reviewers
Heads up for the upgrade path: the new pod-template labels trigger one rolling restart of both StatefulSets on the first upgrade. No StatefulSet, Deployment, or Service selector changed, so there is no immutable-field conflict. The
app:selector migration toapp.kubernetes.io/componentwas deliberately left out; selectors are immutable, so that belongs in a major version.