Repository navigation
feat(erpc): add deploymentAnnotations for Reloader - #333
Merged
Merged
Conversation
Stakater Reloader reads its annotations from the workload metadata, not from the pod template. The chart only exposed podAnnotations, which renders into spec.template.metadata.annotations, so reloader annotations set through it are silently ignored and pods never roll when a mounted ConfigMap or Secret changes. Add deploymentAnnotations, rendered into the Deployment metadata, and move the reloader example in values.yaml off podAnnotations so the documented pattern is the working one.
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.
Reloader annotations set on this chart have never worked, and this makes them work.
Problem
Stakater Reloader reads its annotations from the workload metadata (
Deployment.metadata.annotations), not from the pod template. The chart only exposedpodAnnotations, which renders intospec.template.metadata.annotations, so any reloader annotation set through it is silently ignored and pods never roll when a mounted ConfigMap or Secret changes.values.yamlactively documented the broken pattern:That comment is where the mistake propagated from. Live check on the legacy prod deployment, which sets exactly that:
So
erpc-prod-configchanges have never triggered a restart.This is not theoretical. A Goldsky Edge credential in the new rpcs stack was wrong for weeks; once corrected in Vault, the ExternalSecret synced but the pods kept serving the old value because the key is injected via
env[].valueFrom.secretKeyRef, which Kubernetes only resolves at container start. It took a manualrollout restartto take effect.Change
deploymentAnnotations, rendered into the Deployment metadata.podAnnotationsso the documented pattern is the working one.Verification
With the value set, the annotation lands where Reloader reads it:
Unset, the render is byte-identical to before: zero annotation lines at Deployment level,
podAnnotationsbehavior untouched.Follow-up
A separate app-of-apps PR will set
deploymentAnnotationson the rpcs prod and stage apps for*-rpcs-provider-api-keys, and can fix the legacyrpc-nodesapps to move their existing reloader annotation offpodAnnotations.