Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To get the result you want you need a “define” like that somewhere in your templates:
- {{- define “GetEnv” }}
- {{- $name := index . 0 }}
- {{- $ := index . 1 }}
- // Here try to find $name in $.Values.env first, then fall back to $.Values.tiers (or vice versa)
- {{- end }}
- And config.cfg should look like that:
- NAME={{ include “var1” $ }}
- SURNAME={{ include “var2” $ }}
- JOB={{ include “var3” $ }}
- Now include config.cfg in one of your templates:
- kind: ConfigMap
- data: {{ include “config.cfg” $ | nindent 2 }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement