feat(charts): support Deployment metadata annotations on every deployment - #211
Merged
Conversation
…ment
Renders a new top-level annotations: {} value as the Deployment
metadata.annotations on every deployment-bearing subchart
(lago-rails, lago-front, lago-pdf, lago-events-processor-worker,
lago-data-api, lago-data-worker, lago-mcp-server).
Until now only podAnnotations was wired through, and it landed on
the pod template, which is the wrong object for controllers like
Stakater Reloader that watch and patch the Deployment to trigger
rollouts on ConfigMap/Secret changes. With this change, setting
e.g. annotations: { reloader.stakater.com/auto: "true" } in the
umbrella values is enough to opt a deployment into Reloader.
Adds two shared assertions to tests-common/deployment/common_patterns_test.yaml
to cover the new field both when set and when empty.
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
annotations: {}value to every deployment-bearing subchart (lago-rails,lago-front,lago-pdf,lago-events-processor-worker,lago-data-api,lago-data-worker,lago-mcp-server) and renders it as the Deployment'smetadata.annotations.podAnnotationswas the only existing hook, and it lands on the pod template, not the Deployment, so Reloader never saw the annotation it needs to roll the pods on cm/secret changes.lagochart can opt subcharts into Reloader (or any other Deployment-level annotation) via<subchart>.annotations: { reloader.stakater.com/auto: "true" }.Test plan
task test:unit— all charts pass; the newtests-common/deployment/common_patterns_test.yamlassertions cover the "set" and "empty" casesannotations: { reloader.stakater.com/auto: "true" }onapiand confirm the Deployment manifest carries the annotation atmetadata.annotations