Substituting values in the middle of a ConfigMap #5153
Unanswered
pinkfloydx33
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have some configmaps where the keys represent structured config files (yaml, json, toml) for various components of our infrastructure. For the most part, many of these files are the same across all usages. However there are instances where we need to replace a single token in the middle of one of these values. For example replacing the word "dev" with "prod" in some banner text or "warn" with "trace" for a log level.
It looks like the deprecated
vars
could have solved this;replacements
wouldn't work as the value is buried in the middle of a file which itself is embedded in a configmap.At the moment our only course of action is to maintain multiple copies of these configmap/files. Is there any option that I'm overlooking that would allow us to easily perform substitution inside these values?
Note:
envsubst
isn't an option. We are using kustomize inside of AKS Gitops/FluxCD which reads files directly out of git repository. Flux has apostBuild.substitutions
that would work under normal circumstances except for the fact that the Azure managed Flux doesn't allow setting those values.Beta Was this translation helpful? Give feedback.
All reactions