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

setting annotation would fail the installation for chart version above 3.3.0 #37

Closed
raohuaming opened this issue Aug 5, 2020 · 2 comments · Fixed by #38
Closed

setting annotation would fail the installation for chart version above 3.3.0 #37

raohuaming opened this issue Aug 5, 2020 · 2 comments · Fixed by #38

Comments

@raohuaming
Copy link

raohuaming commented Aug 5, 2020

Describe the bug
if settings annotations while installing couchdb using helm, it will fail for versions above 3.3.0.

Version of Helm and Kubernetes:
helm version(client/server): "v2.12.3"
k8s version(client/server): "v1.11.0+d4cacc0"

What happened:

it will throw errors as below:

Error: render error in "couchdb/templates/statefulset.yaml": template: couchdb/templates/statefulset.yaml:23:28: executing "couchdb/templates/statefulset.yaml" at <include (print $.Tem...>: error calling include: template: couchdb/templates/_helpers.tpl:14:14: executing "couchdb.fullname" at <.Values.fullnameOver...>: can't evaluate field fullnameOverride in type interface {}

What you expected to happen:

It should install couchdb successfully.

How to reproduce it (as minimally and precisely as possible):
3.3.1-3.3.2 would fail:
helm install --debug --dry-run --set annotations.hello=world,couchdbConfig.couchdb.uuid=xxxxyyy couchdb/couchdb --version 3.3.3
helm install --debug --dry-run --set annotations.hello=world,couchdbConfig.couchdb.uuid=xxxxyyy couchdb/couchdb --version 3.3.2
helm install --debug --dry-run --set annotations.hello=world,couchdbConfig.couchdb.uuid=xxxxyyy couchdb/couchdb --version 3.3.1

3.3.0 succeed:
helm install --debug --dry-run --set annotations.hello=world,couchdbConfig.couchdb.uuid=xxxxyyy couchdb/couchdb --version 3.3.0

Anything else we need to know:

nope.

@raohuaming raohuaming changed the title setting annotation would fail the installation for chart versio above 3.3.0 setting annotation would fail the installation for chart version above 3.3.0 Aug 5, 2020
willholley added a commit that referenced this issue Aug 5, 2020
Commit 70b2777 caused user-provided
annotations to break the `checksum` StatefulSet annotations. The
`{{ with .Values.annotations }}` instruction changes the scope
under which the checksum is calculated when user annotations are present.

This removes the `{{ with .Values.annotations }}` and instead just
writes out the user-provided annotations directly.

I've also added a user-provided annotation to the `values.yaml` used
in the smoke test to verify the fix.

Fixes #37
@willholley
Copy link
Member

Thanks for the report @raohuaming - #38 fixes this.

@KaelBaldwin
Copy link

Any update on this @willholley ? Looks like you are just waiting for a CR, can we poke someone? I'm running into this problem now as well.

Thank you for fixing this!

kocolosk pushed a commit that referenced this issue Jan 7, 2022
Commit 70b2777 caused user-provided
annotations to break the `checksum` StatefulSet annotations. The
`{{ with .Values.annotations }}` instruction changes the scope
under which the checksum is calculated when user annotations are present.

This removes the `{{ with .Values.annotations }}` and instead just
writes out the user-provided annotations directly.

I've also added a user-provided annotation to the `values.yaml` used
in the smoke test to verify the fix.

Fixes #37
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 a pull request may close this issue.

3 participants