Skip to content

Commit 0322ca7

Browse files
committed
Fix templating error when defining selector for fetchConfig
1 parent 7b07285 commit 0322ca7

File tree

6 files changed

+6
-18
lines changed

6 files changed

+6
-18
lines changed

hack/charts/cluster-api-operator/templates/addon.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ spec:
4545
{{- end }}
4646
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $addonName) }}
4747
fetchConfig:
48-
{{- range $key, $value := index $.Values.fetchConfig $addonName }}
49-
{{ $key }}: {{ $value }}
50-
{{- end }}
48+
{{- index $.Values.fetchConfig $addonName | toYaml | nindent 4 }}
5149
{{- end }}
5250
{{- if $addon.additionalManifests }}
5351
additionalManifests:

hack/charts/cluster-api-operator/templates/bootstrap.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ spec:
4646
{{- end }}
4747
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $bootstrapName) }}
4848
fetchConfig:
49-
{{- range $key, $value := index $.Values.fetchConfig $bootstrapName }}
50-
{{ $key }}: {{ $value }}
51-
{{- end }}
49+
{{- index $.Values.fetchConfig $bootstrapName | toYaml | nindent 4 }}
5250
{{- end }}
5351
{{- if $bootstrap.additionalManifests }}
5452
additionalManifests:

hack/charts/cluster-api-operator/templates/control-plane.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ spec:
5959
{{- end }}
6060
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $controlPlaneName) }}
6161
fetchConfig:
62-
{{- range $key, $value := index $.Values.fetchConfig $controlPlaneName }}
63-
{{ $key }}: {{ $value }}
64-
{{- end }}
62+
{{- index $.Values.fetchConfig $controlPlaneName | toYaml | nindent 4 }}
6563
{{- end }}
6664
{{- if $controlPlane.additionalManifests }}
6765
additionalManifests:

hack/charts/cluster-api-operator/templates/core.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ spec:
5555
{{- end }}
5656
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $coreName) }}
5757
fetchConfig:
58-
{{- range $key, $value := index $.Values.fetchConfig $coreName }}
59-
{{ $key }}: {{ $value }}
60-
{{- end }}
58+
{{- index $.Values.fetchConfig $coreName | toYaml | nindent 4 }}
6159
{{- end }}
6260
{{- if $core.additionalManifests }}
6361
additionalManifests:

hack/charts/cluster-api-operator/templates/infra.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ spec:
4949
{{- end }}
5050
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $infrastructureName) }}
5151
fetchConfig:
52-
{{- range $key, $value := index $.Values.fetchConfig $infrastructureName }}
53-
{{ $key }}: {{ $value }}
54-
{{- end }}
52+
{{- index $.Values.fetchConfig $infrastructureName | toYaml | nindent 4 }}
5553
{{- end }}
5654
{{- if $.Values.configSecret.name }}
5755
configSecret:

hack/charts/cluster-api-operator/templates/ipam.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ spec:
4949
{{- end }}
5050
{{- if and (kindIs "map" $.Values.fetchConfig) (hasKey $.Values.fetchConfig $ipamName) }}
5151
fetchConfig:
52-
{{- range $key, $value := index $.Values.fetchConfig $ipamName }}
53-
{{ $key }}: {{ $value }}
54-
{{- end }}
52+
{{- index $.Values.fetchConfig $ipamName | toYaml | nindent 4 }}
5553
{{- end }}
5654
{{- if $.Values.configSecret.name }}
5755
configSecret:

0 commit comments

Comments
 (0)