roboll / helmfile

Deploy Kubernetes Helm Charts
MIT License
4.05k stars 565 forks source link

Add useful hook environment variables #2184

Closed pennytextures closed 9 months ago

pennytextures commented 9 months ago

It'd be really useful if a few environment variables were exported for hooks

stuff like:

HELM_RELEASE HELM_CHART HELM_ENVIRONMENT

It'd be really nice to put a pre-sync hook templated into all your releases, then have that script know where it's being invoked from.

Fwiw, my use case is running some idempotent scripts to upgrade charts which don't run cleanly, right now I just run a bunch of scripts before my sync, updating crds etc. it'd be nice if i could wire this script in as a pre-sync hook, and then only run these migrations before syncing the relevant chart.

yxxhero commented 9 months ago

@pennytextures please post issue in helmfile/helmfile. thanks so much.