Skip to content

Commit 9fe780e

Browse files
committed
Add featureGates condition to bootstrap and control-plane providers
1 parent 98dd799 commit 9fe780e

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,21 @@ metadata:
3838
annotations:
3939
"helm.sh/hook": "post-install,post-upgrade"
4040
"helm.sh/hook-weight": "2"
41-
{{- if or $controlPlaneVersion $.Values.configSecret.name }}
41+
{{- if or $controlPlaneVersion $.Values.configSecret.name $.Values.manager }}
4242
spec:
4343
{{- end}}
4444
{{- if $controlPlaneVersion }}
4545
version: {{ $controlPlaneVersion }}
4646
{{- end }}
47+
{{- if $.Values.manager }}
48+
manager:
49+
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.controlPlane }}
50+
featureGates:
51+
{{- range $key, $value := $.Values.manager.featureGates.controlPlane }}
52+
{{ $key }}: {{ $value }}
53+
{{- end }}
54+
{{- end }}
55+
{{- end }}
4756
{{- if $.Values.configSecret.name }}
4857
configSecret:
4958
name: {{ $.Values.configSecret.name }}

0 commit comments

Comments
 (0)