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

nginx annotations helm set syntax #42

Closed
jansmets opened this issue Sep 21, 2018 · 6 comments
Closed

nginx annotations helm set syntax #42

jansmets opened this issue Sep 21, 2018 · 6 comments

Comments

@jansmets
Copy link

jansmets commented Sep 21, 2018

The only way I could set the ingress class was to run this:

--set ingress.annotations.'kubernetes\.io/ingress\.class'=bla \
warning: destination for annotations is a table. Ignoring non-table value <nil>

Perhaps it's better to do

--set ingress.annotations[0].key="kubernets.io/ingress.class" \
--set ingress.annotations[0].value="bla" \

(helm 1.9)

@jainishshah17
Copy link
Contributor

@jansmets Yah that's the right way to pass it using --set flag.

@jansmets
Copy link
Author

I hope you agree that this is quite annoying and the warning makes it even dubious.

@danielezer
Copy link
Contributor

@jansmets I think this syntax is the standard for adding annotations, just passing them as is into the spec, since the annotations object is a map and not a dictionary. I think you should use a values file if this syntax bothers you

@bechampion
Copy link

bechampion commented Nov 28, 2019

This worked for me , i can't seem to find anywhere on the interwebs:
helm install stable/nginx-ingress --set controller.service.annotations."cloud\.google\.com\/load-balancer\-type"=Internal

@evannorstrand
Copy link
Contributor

@danielezer - the fix to this is to add a {} after every annotation location in values.yaml. Should look like below:

annotations: {}

@danielezer
Copy link
Contributor

Thanks @evannorstrand! I see you added this fix to your PR. Thanks for your contribution!!

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

No branches or pull requests

5 participants