Can a HelmChart pre-install hook, modify chart resources?

3/24/2020

The goal: Using Helm Chart pre-install hook, take a file on the filesystem, encode it and place it as a resource file (referenced by a configMap.

Questions:

  • Can a Helm Chart pre-install hook access files that are not under the root chart?
  • Can a Helm Chart pre-install hook modify or add a file under the Chart root?
  • Other then implicitly writing the bash script inside the chart resource yaml, can the pre-install hook execute a bash script if it is placed in the chart?
-- user1015767
charts
hook
kubernetes
kubernetes-helm

1 Answer

3/24/2020

No, Hooks run as Jobs inside the Kubernetes cluster, so they have no access to your workstation. What you want is the Events system (https://github.com/helm/community/blob/master/helm-v3/002-events.md) which is still a WIP I think.

-- coderanger
Source: StackOverflow