Kustomize
Hard
Mutation
In a strategic merge patch, what does $patch: replace inside a container's resources map do?
Select your answer:
Show answer and explanation
Answer: Makes the patch's map the whole value, dropping keys the patch leaves out
Explanation
Strategic merge normally merges maps key by key, so leaving out limits.memory in a patch doesn't remove it. $patch: replace makes the patch's map the full value, and $patch: delete removes it.
More hard Kustomize questions
- A patch target sets name: app. Does it also match a Deployment named app-worker?
- A patch changes the metadata.name of its target, and the build fails. What allows the rename?
- Which query parameter of a remote resource URL sets how long Kustomize waits for the fetch?
- A replacement's target field doesn't exist yet in the target resource. What makes Kustomize add it?
- An overlay sets replicas for a Deployment that a HorizontalPodAutoscaler scales. What happens on each kubectl apply -k?
- A configMapGenerator entry has files: [config/app.properties]. Which key holds the file's content?