Skip to content

Commit 52c29db

Browse files
committed
Add featureGates to kubeadm ControlPlaneProvider
1 parent 194d5c6 commit 52c29db

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,25 @@ 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 hasKey $.Values.manager.featureGates $controlPlaneName }}
50+
{{- range $key, $value := $.Values.manager.featureGates }}
51+
{{- if eq $key $controlPlaneName }}
52+
featureGates:
53+
{{- range $k, $v := $value }}
54+
{{ $k }}: {{ $v }}
55+
{{- end }}
56+
{{- end }}
57+
{{- end }}
58+
{{- end }}
59+
{{- end }}
4760
{{- if $.Values.configSecret.name }}
4861
configSecret:
4962
name: {{ $.Values.configSecret.name }}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ metadata:
5353
"argocd.argoproj.io/sync-wave": "2"
5454
{{- with .Values.configSecret }}
5555
spec:
56+
{{- if $.Values.manager }}
57+
manager:
58+
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.kubeadm }}
59+
featureGates:
60+
{{- range $key, $value := $.Values.manager.featureGates.kubeadm }}
61+
{{ $key }}: {{ $value }}
62+
{{- end }}
63+
{{- end }}
64+
{{- end }}
5665
configSecret:
5766
name: {{ .name }}
5867
{{- if .namespace }}

0 commit comments

Comments
 (0)