Skip to content

Commit 20c0566

Browse files
committed
Add featureGates condition to bootstrap and control-plane providers
Signed-off-by: Gabriel Almeida <[email protected]>
1 parent 298d7b7 commit 20c0566

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ spec:
4444
{{- if $bootstrapVersion }}
4545
version: {{ $bootstrapVersion }}
4646
{{- end }}
47+
{{- if $.Values.manager }}
48+
manager:
49+
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.bootstrap }}
50+
featureGates:
51+
{{- range $key, $value := $.Values.manager.featureGates.bootstrap }}
52+
{{ $key }}: {{ $value }}
53+
{{- end }}
54+
{{- end }}
55+
{{- end }}
4756
{{- if $.Values.configSecret.name }}
4857
configSecret:
4958
name: {{ $.Values.configSecret.name }}

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,11 @@ spec:
4646
{{- end }}
4747
{{- if $.Values.manager }}
4848
manager:
49-
{{- if hasKey $.Values.manager.featureGates $controlPlaneName }}
50-
{{- range $key, $value := $.Values.manager.featureGates }}
51-
{{- if eq $key $controlPlaneName }}
49+
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.controlPlane }}
5250
featureGates:
53-
{{- range $k, $v := $value }}
54-
{{ $k }}: {{ $v }}
51+
{{- range $key, $value := $.Values.manager.featureGates.controlPlane }}
52+
{{ $key }}: {{ $value }}
5553
{{- end }}
56-
{{- end }}
57-
{{- end }}
5854
{{- end }}
5955
{{- end }}
6056
{{- if $.Values.configSecret.name }}

0 commit comments

Comments
 (0)