Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Add comma only if labels are not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
DingPing Yuan committed Nov 23, 2022
1 parent e1ebb73 commit 8deb9f2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,9 @@ spec:
{{- $key }}={{ $val }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand All @@ -549,7 +551,9 @@ spec:
{{- $key }}={{ $val }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,9 @@ spec:
{{- $key -}} = {{- $val }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand All @@ -794,7 +796,9 @@ spec:
{{- $key -}} = {{- $val }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,9 @@ spec:
{{- end }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand All @@ -999,7 +1001,9 @@ spec:
{{- end }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand Down
4 changes: 4 additions & 0 deletions providers/infrastructure-aws/v2.0.0-beta.1/cconly/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,9 @@ spec:
{{- $key }}={{ $val }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand All @@ -549,7 +551,9 @@ spec:
{{- $key }}={{ $val }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand Down
4 changes: 4 additions & 0 deletions providers/infrastructure-azure/v1.5.3/cconly/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,9 @@ spec:
{{- $key -}} = {{- $val }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand All @@ -794,7 +796,9 @@ spec:
{{- $key -}} = {{- $val }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand Down
4 changes: 4 additions & 0 deletions providers/infrastructure-vsphere/v1.4.1/cconly/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,9 @@ spec:
{{- end }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand All @@ -999,7 +1001,9 @@ spec:
{{- end }}
{{- end }}
{{- if .controlPlane.nodeLabels -}}
{{- if (index .TKR_DATA .builtin.controlPlane.version).labels -}}
,
{{- end -}}
{{- $first := true }}
{{- range .controlPlane.nodeLabels }}
{{- if $first }}
Expand Down

0 comments on commit 8deb9f2

Please sign in to comment.