diff --git a/hack/charts/cluster-api-operator/templates/control-plane.yaml b/hack/charts/cluster-api-operator/templates/control-plane.yaml index b7cec76d5..c27c6c8fe 100644 --- a/hack/charts/cluster-api-operator/templates/control-plane.yaml +++ b/hack/charts/cluster-api-operator/templates/control-plane.yaml @@ -44,6 +44,19 @@ spec: {{- if $controlPlaneVersion }} version: {{ $controlPlaneVersion }} {{- end }} +{{- if $.Values.manager }} + manager: +{{- if hasKey $.Values.manager.featureGates $controlPlaneName }} +{{- range $key, $value := $.Values.manager.featureGates }} + {{- if eq $key $controlPlaneName }} + featureGates: + {{- range $k, $v := $value }} + {{ $k }}: {{ $v }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} +{{- end }} {{- if $.Values.configSecret.name }} configSecret: name: {{ $.Values.configSecret.name }} diff --git a/hack/charts/cluster-api-operator/templates/infra-conditions.yaml b/hack/charts/cluster-api-operator/templates/infra-conditions.yaml index 2d1e8ccae..50551a2b6 100644 --- a/hack/charts/cluster-api-operator/templates/infra-conditions.yaml +++ b/hack/charts/cluster-api-operator/templates/infra-conditions.yaml @@ -49,6 +49,15 @@ metadata: "helm.sh/hook-weight": "2" {{- with .Values.configSecret }} spec: +{{- if $.Values.manager }} + manager: +{{- if $.Values.manager.featureGates.kubeadm }} + featureGates: + {{- range $key, $value := $.Values.manager.featureGates.kubeadm }} + {{ $key }}: {{ $value }} + {{- end }} +{{- end }} +{{- end }} configSecret: name: {{ .name }} {{- if .namespace }}