-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add tolerations to StatefulSet #28
Conversation
{{- end }} | ||
{{- if $root.Values.tolerations }} | ||
tolerations: | ||
{{ toYaml $root.Values.tolerations | indent 8 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be unindented to make the | indent 8
work, apparently. Unsure if there's a better way to do it.
This is actually also kind of an issue for nodeSelector
, but I think it would only show up if there are more than one label in the selector. If there's only one, the selector is visually overindented but still valid YAML:
spec:
nodeSelector:
# should be here...
# but is actually here
foo: bar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, good catch 😄 . AFAIK better would be to have something like this,
{{- if $root.Values.tolerations }}
tolerations:
{{- toYaml $root.Values.tolerations | nindent 8 }}
{{- end }}
The hyphen before toYaml
will remove one line (along with our indentation). The nindent
will add a new line and then indent our object by 8.
Also, as you mentioned the nodeSelector needs to be fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also change the tolerations: []
from values.yaml to tolerations: {}
as it's not a list.
{{- end }} | ||
{{- if $root.Values.tolerations }} | ||
tolerations: | ||
{{ toYaml $root.Values.tolerations | indent 8 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, good catch 😄 . AFAIK better would be to have something like this,
{{- if $root.Values.tolerations }}
tolerations:
{{- toYaml $root.Values.tolerations | nindent 8 }}
{{- end }}
The hyphen before toYaml
will remove one line (along with our indentation). The nindent
will add a new line and then indent our object by 8.
Also, as you mentioned the nodeSelector needs to be fixed.
Along with the changes requested by @bhavin192 , could you please add a Test Plan to the commit summary with the helm command line used to test these changes? Thanks! |
Fixes #27