k8wiz
Flux CD
Hard
Troubleshooting

A ConfigMap applied by a Flux Kustomization holds a shell script using ${HOME}, and postBuild substitution blanks it out. What stops that?

Select your answer:

Show answer and explanation

Answer: Annotating it with kustomize.toolkit.fluxcd.io/substitute: disabled

Explanation

postBuild substitution replaces every ${var} in the built manifests, and an undefined variable without a default becomes an empty string. The substitute: disabled annotation skips the object. You can also write $HOME without braces, or $${HOME}, which comes out as ${HOME}.