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
helm: use toYaml for discovery nodeAffinity #13931
Conversation
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.
Thanks for the contribution. I see this will now have the same format that the CSI settings are already using, so it makes sense.
Could you just squash to a single commit? Or else the second commit needs a description message. A single commit is fine since it's the same description.
this commit allow user to use requiredDuringSchedulingIgnoredDuringExecution map Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
7d76221
to
2e0c015
Compare
I squashed it into a single commit :) |
helm: use toYaml for discovery nodeAffinity (backport #13931)
@@ -68,7 +68,7 @@ spec: | |||
{{- end }} | |||
{{- if .Values.discover.nodeAffinity }} | |||
- name: DISCOVER_AGENT_NODE_AFFINITY | |||
value: {{ .Values.discover.nodeAffinity }} | |||
value: {{ toYaml .Values.discover.nodeAffinity | quote }} |
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.
why quote
@hhk7734 ?
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.
an error occurs if there is no quote
when using dict type yaml.
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.
without quote
- name: DISCOVER_AGENT_NODE_AFFINITY
value: |
{{- toYaml .Values.discover.nodeAffinity | nindent 12 }}
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.
yes without quote make more sense to me, not sure how it is nindent
if just specify the quote
keyword, do you have any document that explains it
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.
https://helm.sh/docs/chart_template_guide/functions_and_pipelines/
Using | quote
in env[].value
is very common, so I cannot get the reason to replace to nindent
.
Even you can see using quote
above this line.
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.
thanks for the info!
Checklist: