-
Notifications
You must be signed in to change notification settings - Fork 902
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
[K8S][HELM] Align Helm templates with formatting approach #6492
base: master
Are you sure you want to change the base?
Conversation
@@ -20,9 +20,7 @@ apiVersion: monitoring.coreos.com/v1 | |||
kind: PrometheusRule | |||
metadata: | |||
name: {{ .Release.Name }} | |||
labels: | |||
{{- include "kyuubi.labels" . | nindent 4 }} | |||
labels: {{- include "kyuubi.labels" . | nindent 4 }} |
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.
well, but the previous one is more intuitive for me, since the rendered result of template
labels:
{{- include "kyuubi.labels" . | nindent 4 }}
is something like
labels:
label1: value1
label2: value2
any specify reason to use the proposed one?
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.
There is no specific reason, rather than following one style across all templates. The idea is to keep templates more compact if it is possible. We use this formatting style in many places, for instance:
rules: {{- toYaml .Values.rbac.rules | nindent 2 }} |
annotations: {{- toYaml . | nindent 4 }} |
sessionAffinityConfig: {{- toYaml . | nindent 4 }} |
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.
I agree to unify the style, but lean to invert the style.
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.
There is no strong convention at the moment as far as I know, so both approaches are valid. Personally I prefer more compact style, because from my experience it's more convenient to read and review the code, especially if a template has many lines. One argument here might be that Bitnami uses this approach as well for all their charts.
🔍 Description
Issue References 🔗
There are few formatting misalignments in the Helm chart.
Describe Your Solution 🔧
The PR aligns the chart templates formatting without any functional changes.
Types of changes 🔖
Test Plan 🧪
Test 1
All templates (and rendered
labels
) are correct with default chart values:Test 2
Templates
kyuubi-alert.yaml
,kyuubi-podmonitor.yaml
andkyuubi-servicemonitor.yaml
are correct with additionally provided values:File
values-monitoring.yaml
used for testingChecklist 📝
Be nice. Be informative.