Kustomize
Hard
Generation
Why does generatorOptions.immutable: true work well with Kustomize's default hash suffix?
Select your answer:
Show answer and explanation
Answer: New data gets a new name, so the old immutable ConfigMap never has to change
Explanation
An immutable ConfigMap or Secret can't be edited, only deleted and recreated, and the kubelet stops watching it for changes, which lowers the load on the API server. With the hash suffix, every change already produces a new object. Without the hash, an apply that changes the data would fail.
More hard Kustomize questions
- Why can a component patch resources defined in the overlay that includes it, when a base can't?
- Which field path selects the value of the env var SERVICE_HOST in the container named app, for a replacement target?
- A production overlay lists a remote base with ?ref=main. What's the risk?
- A strategic merge patch adds one item to a list in a custom resource, but the build replaces the whole list. Why?
- A custom resource refers to a generated ConfigMap by name, but after the build it still uses the name without the hash suffix. Why?
- An overlay's configMapGenerator uses the same name as one generated in the base, with no behavior set. What happens?