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

doc: Update documentation about layering release values #837

Merged
merged 8 commits into from
Sep 6, 2019

Conversation

a-hat
Copy link
Contributor

@a-hat a-hat commented Sep 3, 2019

setTemplate and valuesTemplate do not work, I think it is correct without the Template suffix.

I also added a note to the documentation regarding this issue #836

@mumoshu
Copy link
Collaborator

mumoshu commented Sep 4, 2019

@a-hat Hey! Thanks for your support.

This part of the documentation specifically explain how Release Templating works. Are you sure you've tested it with the Release Template feature, or just regular values without nested template expressions in it?

@mumoshu
Copy link
Collaborator

mumoshu commented Sep 4, 2019

The point is that this shouldn't work as expected until #823:

    set:
    - name: '{{`{{ .Release.Name }}`}}'
      values: '{{`{{ .Release.Namespace }}`}}'

As until #823 nested template expressions that are starting with:

{{`

and ending with:

`}}

are rendered as-is without template expressions being evaluated.

@a-hat
Copy link
Contributor Author

a-hat commented Sep 4, 2019

Hi @mumoshu!

After reading the documentation I tried something like this (note the valuesTemplate in the templates map) to set values in a release template:

templates:
  default: &default
    valuesTemplate:
    - image: default    

releases:
- name: demo
  <<: *default
  chart: stable/traefik
  version: ^1.70.2
  values:
  - image: demo

which gives me these errors:

in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 1: yaml: unmarshal errors:
  line 3: field valuesTemplate not found in type state.TemplateSpec
  line 3: field valuesTemplate not found in type state.ReleaseSpec

Is the documentation referring to something else which I am missing?

@mumoshu
Copy link
Collaborator

mumoshu commented Sep 5, 2019

@a-hat valuesTemplate should be available since helmfile v0.82.0! Which version of helmfile are you using?

Btw, in your example you don't need valuesTemplate. Just use values.

templates:
  default: &default
    values:
    - image: default    

releases:
- name: demo
  <<: *default
  chart: stable/traefik
  version: ^1.70.2
  values:
  - image: demo

@a-hat
Copy link
Contributor Author

a-hat commented Sep 5, 2019

I see, thanks for the clarification. I was using version 0.81.3, so this is why valuesTemplate did not work.

I updated the PR and left the section about layering values. Does this make sense for you?

@mumoshu
Copy link
Collaborator

mumoshu commented Sep 5, 2019

@a-hat Thanks!

Would you mind prepending ## Layering Release Values to the paragraph you've just added?

The statements are correct. I believe it should reside within a dedicated section though.

@a-hat
Copy link
Contributor Author

a-hat commented Sep 5, 2019

Thanks for your feedback! Makes sense, I have updated the doc.

Copy link
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks a lot for your contribution @a-hat ☺️

@mumoshu mumoshu changed the title update documentation about using 'values' in release template doc: Update documentation about layering release values Sep 6, 2019
@mumoshu mumoshu merged commit 6dfc9be into roboll:master Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants