Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helmDefaults.tillerless is not inherited to releases #875

Open
mumoshu opened this issue Sep 25, 2019 · 1 comment
Open

helmDefaults.tillerless is not inherited to releases #875

mumoshu opened this issue Sep 25, 2019 · 1 comment
Labels

Comments

@mumoshu
Copy link
Collaborator

mumoshu commented Sep 25, 2019

Per https://sweetops.slack.com/archives/CE5NGCB9Q/p1569425828026200

Is this a bug? Needs investigation.

@RobertoUa
Copy link

RobertoUa commented Sep 26, 2019

I have a rather strange setup (it will improve with #715)

main helmfile.yaml:

{{ readFile "base.yaml" }}

---

bases:
  - helm-defaults.yaml

repositories:
  - name: stable
    url: https://kubernetes-charts.storage.googleapis.com
  - name: incubator
    url: https://kubernetes-charts-incubator.storage.googleapis.com

helmfiles:
  - dep1.yaml
  - dep2.yaml

base.yaml

environments:
  prod:
    kubeContext: ctx

helm-defaults.yaml

helmDefaults:
  tillerNamespace: kube-system
  tillerless: true
  kubeContext: {{ .Values.kubeContext }}
  verify: false #sometimes fails for some reason
  atomic: true
  wait: true
  timeout: 300
  force: true

and every sub-helmfile (loaded like depN.yaml in the first example) begins with:

{{ readFile "../base.yaml" }}

---

releases:
  - name: name
    etc: ...

Now that I explained my setup I realized that helmDefaults needs to be also loaded in every sub-helmfile. But the strange thing is that kubeContext is inhereted from the main helmfile.

If I move the following snippet to base.yaml it will fail with in ./helmfile.yaml: error during helm-defaults.yaml.part.0 parsing: template: stringTemplate:4:25: executing "stringTemplate" at <.Values.kubeContext>: map has no entry for key "kubeContext"

#We're inside base.yaml (environment: with values instead of this comment)
---

bases:
  - helm-defaults.yaml

If I move contents of helm-defaults to the same place I would get in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 2: yaml: unmarshal errors: line 46: cannot unmarshal !!map into string

I've done several other changes, and I still get one of those two errors.

Btw verify: true fails with Error: failed to download "stable/some-chart" (hint: running helm repo update may help) Error: plugin "tiller" exited with error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants