Kustomize
Hard
Troubleshooting
An env file used by a configMapGenerator has the line MODE="fast". What value does the generated ConfigMap hold for MODE?
Select your answer:
Show answer and explanation
Answer: "fast", with the quote characters kept in the value
Explanation
Kustomize splits each env file line at the first = and keeps the rest exactly as written, quotes included. The literals field is different: it strips one pair of matching surrounding quotes, so MODE="fast" under literals gives fast. The env file is not parsed as YAML.
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?