Kustomize
Hard
Troubleshooting
A replacement's source sets kind: ConfigMap and name: cm.*, and the build fails with "nothing selected by". Why?
Select your answer:
Show answer and explanation
Answer: The source name is matched literally, unlike a target's select
Explanation
Target select and reject fields accept regular expressions, but the source compares group, version, kind, name and namespace as plain strings. No ConfigMap is literally named cm.*, so nothing matches. The source must resolve to exactly one resource, and two matches fail with "multiple matches for selector".
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?