I'm trying to incorporate a helm chart into my kustomize setup. So I have added it to my kustomization.yaml
:
...
helmGlobals:
chartHome: ../test/vault
helmCharts:
- name: helm-vault
valuesFile: ../test/vault-values.yaml
...
When I try to build this on command line I get this error:
$ kustomize build --enable-helm infrastructure/vault/dev
Error: accumulating resources: accumulation err='accumulating resources from '../_base': '/home/tel/Private/Sources/domstolene@github.com/k8s-applications/infrastructure/vault/_base' must resolve to a file': recursed accumulation of path '/home/tel/Private/Sources/domstolene@github.com/k8s-applications/infrastructure/vault/_base': unable to run: 'helm version -c --short' with env=[HELM_CONFIG_HOME=/tmp/kustomize-helm-821391692/helm HELM_CACHE_HOME=/tmp/kustomize-helm-821391692/helm/.cache HELM_DATA_HOME=/tmp/kustomize-helm-821391692/helm/.data] (is 'helm' installed?)
The message suggests that helm
might not be installed; however when I run it it is readily found:
$ helm version -c --short
v3.10.1+g9f88ccb
Also; my kustomize version:
$ kustomize version
v5.0.1
What might be the reason?
Update
I tried to follow this very nice guide: https://github.com/kubernetes-sigs/kustomize/blob/kustomize/v4.1.0/examples/chart.md
I still get same error message even though I used the --helm-command
argument to give kustomize the absolute path to the helm binary /snap/bin/helm
.
It may seem like kustomize
have a problem with snap
in some way. I downloaded a binary version from the helm release page and specifying that binary with --helm-command
seems to remove the problem entirely.
Update
It wasn't this entirely neither. So far it seems like the helm-binary have to reside under my home-directory. See https://github.com/kubernetes-sigs/kustomize/issues/5094#issuecomment-1473459361
Updatier
It seem to be snap after all; although not the helm installation. The kustomize binary was also installed by snap. I removed it and installed a binary version instead and then everything worked like a charm.
It could be related to kustomize installed as regular snap-application and helm installed as "classic" snap-application.