roboll / helmfile

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

Issue while trying to use linkerd chart `/partials not found` #1350

Open scorsi opened 4 years ago

scorsi commented 4 years ago

Hello 👋

I'm trying to use helmfile to create my linkerd resources. I want to use Helm to modify my linkerd options. Here's my helmfile:

repositories:
  - name: linkerd
    url: https://helm.linkerd.io/stable

releases:
  - name: linkerd
    namespace: linkerd
    chart: linkerd/linkerd2
    version: 2.8.1

Very simple (and I know it can't work since we must provide certificates files but this is not the issue here). Here's the stacktrace:

$> helmfile template       
Adding repo linkerd https://helm.linkerd.io/stable
"linkerd" has been added to your repositories

Updating repo
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "linkerd" chart repository
...Successfully got an update from the "solo" chart repository
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "incubator" chart repository
Update Complete. ⎈ Happy Helming!⎈ 

Fetching linkerd/linkerd2
Building dependency release=linkerd, chart=/var/folders/ld/l11ndr2d3xsclhqxbjjhmkbw0000gn/T/180938882/linkerd/2.8.1/linkerd/linkerd2/linkerd2
in ./helmfile.yaml: command "/usr/local/bin/helm" exited with non-zero status:

PATH:
  /usr/local/bin/helm

ARGS:
  0: helm (4 bytes)
  1: dependency (10 bytes)
  2: build (5 bytes)
  3: /var/folders/ld/l11ndr2d3xsclhqxbjjhmkbw0000gn/T/180938882/linkerd/2.8.1/linkerd/linkerd2/linkerd2 (98 bytes)

ERROR:
  exit status 1

EXIT STATUS
  1

STDERR:
  Error: directory /var/folders/ld/l11ndr2d3xsclhqxbjjhmkbw0000gn/T/180938882/linkerd/2.8.1/linkerd/linkerd2/partials not found

COMBINED OUTPUT:
  Error: directory /var/folders/ld/l11ndr2d3xsclhqxbjjhmkbw0000gn/T/180938882/linkerd/2.8.1/linkerd/linkerd2/partials not found
$> helm search repo linkerd
NAME                            CHART VERSION   APP VERSION     DESCRIPTION                                       
linkerd/linkerd2                2.8.1           stable-2.8.1    Linkerd gives you observability, reliability, a...
linkerd/linkerd2-cni            2.8.1           stable-2.8.1    A helm chart containing the resources needed by...
linkerd/linkerd2-multicluster   2.8.1           stable-2.8.1    A helm chart containing the resources to enable...

$> helm install linkerd linkerd/linkerd2                            
Error: execution error at (linkerd2/charts/grafana/templates/grafana.yaml:154:12): Please provide the identity trust anchors

Here's how to use linkerd helm chart: https://linkerd.io/2/tasks/install-helm/.

As you can see, this actual helmfile should fails like helm does, with Please provide the identity trust anchors error. But I got a weird Error: directory /var/folders/ld/l11ndr2d3xsclhqxbjjhmkbw0000gn/T/180938882/linkerd/2.8.1/linkerd/linkerd2/partials not found.

Thanks

cp38510 commented 4 years ago

Hello! I have same issue. With versions before 0.118.0 all working great(last work version 0.117.0), since 0.118.0 version I have error:

$ helmfile -f helmfile/helmfile.yaml -e test lint

Adding repo engage https://example.com/chartrepo/test
"test" has been added to your repositories

Adding repo stable https://kubernetes-charts.storage.googleapis.com
"stable" has been added to your repositories

Adding repo bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories

Updating repo
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "hashicorp" chart repository
...Successfully got an update from the "kubernetes-dashboard" chart repository
...Successfully got an update from the "jetstack" chart repository
......
Update Complete. ⎈ Happy Helming!⎈

Fetching test/dd1
Fetching test/dd2
Fetching test/dd3
Fetching test/dd4
Building dependency release=dd1, chart=/var/folders/qd/xbb5y2k51nj23wpk0_l344tw0000gn/T/047368462/dd1/0.5.2/test/dd1/dd1
Building dependency release=dd2, chart=/var/folders/qd/xbb5y2k51nj23wpk0_l344tw0000gn/T/047368462/dd2/0.5.1/test/dd2/dd2
Building dependency release=dd3, chart=/var/folders/qd/xbb5y2k51nj23wpk0_l344tw0000gn/T/047368462/dd3/0.5.0/test/dd3/dd3
.......

After that a lot of errors like:
in helmfile-apps/helmfile.yaml: 26 errors:
err 0: command "/usr/local/bin/helm" exited with non-zero status:

PATH:
  /usr/local/bin/helm

ARGS:
  0: helm (4 bytes)
  1: --kube-context (14 bytes)
  2: arn:aws:eks:us-central-1:12345678:cluster/test (52 bytes)
  3: dependency (10 bytes)
  4: build (5 bytes)
  5: /tmp/734064426/dd1/0.5.2/test/dd1/dd1 (39 bytes)

ERROR:
  exit status 1

EXIT STATUS
  1

STDERR:
  Error: directory /tmp/734064426/dd1/0.5.2/test/common/test-common not found

.............

I reproduced this error on Mac OS and Linux, test helmfile versions: 0.118.0 0.118.2 0.120.0 0.121.1

How resolve this error???

benmathews commented 4 years ago

Glad to know I'm not crazy. Hitting this also.

semoac commented 4 years ago

Same issue here. On my case its only happens when I use jsonPatches in the release definition.

semoac commented 4 years ago

After reviewing the chart, It's looks like a problem with the requirements pointing to a directory that only exists when you clone the repository. When Helmfile runs helm dep up the directory do not exist triggering the failure. ¿Anyone knows how to stop helmfile from running dep up on the charts? --skip-deps is not working on this case.

mumoshu commented 4 years ago

I believe this is going to be fully resolved after merging #1548. Also see #1547 by @semoac