Changing a ConfigMap value in the chart does not restart the pods, so the app keeps old config. What do you change?
IntermediateScenarioChart Design & Authoring
Answer
Situation read → Pods read config at startup (env vars or a file loaded once). A ConfigMap update does not change the pod template, so no rollout happens.
What I'd do →
- Add a checksum annotation to the pod template:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/api-configmap.yaml") . | sha256sum }}
- Do the same for Secrets the chart renders.
- For externally managed config, use a tool like Stakater Reloader, or include a version value in the name of the ConfigMap.
Why → Any config change now alters the pod template hash and triggers a normal rolling update.
Interview tip → Avoid .Release.Revision annotations; they restart pods on every deploy even when nothing changed.
More on Chart Design & Authoring
Your team has 15 near-identical YAML folders, one per microservice per environment. How do you introduce Helm?BeginnerShould you build one generic chart for all microservices or one chart per service?IntermediateA developer hardcoded `namespace: production` in every template. What is wrong and how do you fix it?BeginnerYou need the same chart to support both Ingress and Gateway API HTTPRoute. How do you design it?IntermediateYour chart's Deployment template has grown to 300 lines of nested `if`s. How do you clean it up?IntermediateHow do you make a chart work for both a stateless API and a worker that has no Service?Intermediate