Skip to content

Instantly share code, notes, and snippets.

@Pictor13
Created March 19, 2024 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pictor13/b0161fd8953abef90b99c924ff481db6 to your computer and use it in GitHub Desktop.
Save Pictor13/b0161fd8953abef90b99c924ff481db6 to your computer and use it in GitHub Desktop.
Helm Values replacement (to only have a single one, rather than one per-environment)

FROM: helm/helm#10026 (comment)

As I have not found any easy way to use environment variables in the values.yaml have I used this line to full fill the requirements.

CI_ENVIRONMENT_SLUG=lala envsubst < charts/values.yaml| helm \
  --kubeconfig ../kubeconf-dev \
  -n mynamespace install --create-namespace -f - --dry-run myapp ./mycharts

The main point is -f -

@Pictor13
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment