Kustomize
Medium
Troubleshooting
You change only the options.labels of a configMapGenerator entry. What happens to the ConfigMap's name suffix?
Select your answer:
Show answer and explanation
Answer: It stays the same, because labels are not part of the hash
Explanation
For a ConfigMap, Kustomize hashes only the kind, the name, data and binaryData. Labels and annotations are left out, so the suffix and the references in workloads stay the same and no rollout is triggered. Change a data value to get a new name.
More medium Kustomize questions
- An overlay's configMapGenerator sets behavior: merge for a ConfigMap that no base defines. What does kustomize build do?
- Why can adding a label through commonLabels make kubectl apply fail for an existing Deployment?
- How do you add a label to every resource without changing any selectors?
- What does an images entry with name: nginx and a digest: sha256:... value do?
- A strategic merge patch lists one container with a new image. What happens to the base's other containers?
- How do you remove a container from a base Deployment with a strategic merge patch?