Search code examples
kuberneteskubernetes-helm

Helm hook - is there a way to get the value of execution stage in the pod/job


I have a k8s job setup as a helm hook for pre-install and pre-upgrade stages.

"helm.sh/hook": pre-install,pre-upgrade

Is there a way to know inside the job/pod which stage it is getting executed - whether it is pre-install or pre-upgrade ?


Solution

  • You could create separate jobs/pods manifests assigning them different arguments/env variables to keep track of the hook events. I haven't seen anything in the tool itself.