Kustomize
Medium
Mutation
A replacement target points at an arg with the value --db-host=PLACEHOLDER and sets delimiter: "=" and index: 1. The source value is prod-postgres. What does the arg become?
Select your answer:
Show answer and explanation
Answer: --db-host=prod-postgres
Explanation
On a target, Kustomize splits the current value on the delimiter, replaces the piece at index, and joins the pieces again. Index 0 is --db-host and index 1 is PLACEHOLDER, so only the host changes. An index past the end would append the value as a new piece instead.
More medium Kustomize questions
- 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?
- When is a JSON 6902 patch a better choice than a strategic merge patch?