I have a Helm chart and in the deployment, I want to provide some environment variable for my pods. During build time in my CI/CD setup, I have the values as env vars and I'm passing them now like this:
helm upgrade CHART_NAME helm --install --set-string webserver.env.DATABASE_URL=$DATABASE_URL
I have like more then 20 env vars, can I access them somehow in my values.yml?
webserver:
env:
DATABASE_URL=${DATABASE_URL}
Sadly this one doesn't work.
Helm does not resolve placeholders (environment variables) inside
values
files, but you can do it yourself in the CI/CD script, before passing the file to thehelm upgrade
command:values-env.yaml:
CI/CD script: