diff --git a/hack/charts/cluster-api-operator/templates/bootstrap.yaml b/hack/charts/cluster-api-operator/templates/bootstrap.yaml index 69a930f2a..871ad5a47 100644 --- a/hack/charts/cluster-api-operator/templates/bootstrap.yaml +++ b/hack/charts/cluster-api-operator/templates/bootstrap.yaml @@ -44,6 +44,15 @@ spec: {{- if $bootstrapVersion }} version: {{ $bootstrapVersion }} {{- end }} +{{- if $.Values.manager }} + manager: +{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.bootstrap }} + featureGates: + {{- range $key, $value := $.Values.manager.featureGates.bootstrap }} + {{ $key }}: {{ $value }} + {{- end }} +{{- end }} +{{- end }} {{- if $.Values.configSecret.name }} configSecret: name: {{ $.Values.configSecret.name }} diff --git a/hack/charts/cluster-api-operator/templates/control-plane.yaml b/hack/charts/cluster-api-operator/templates/control-plane.yaml index c8eaedc4d..b90115688 100644 --- a/hack/charts/cluster-api-operator/templates/control-plane.yaml +++ b/hack/charts/cluster-api-operator/templates/control-plane.yaml @@ -46,15 +46,11 @@ spec: {{- end }} {{- if $.Values.manager }} manager: -{{- if hasKey $.Values.manager.featureGates $controlPlaneName }} -{{- range $key, $value := $.Values.manager.featureGates }} - {{- if eq $key $controlPlaneName }} +{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.controlPlane }} featureGates: - {{- range $k, $v := $value }} - {{ $k }}: {{ $v }} + {{- range $key, $value := $.Values.manager.featureGates.controlPlane }} + {{ $key }}: {{ $value }} {{- end }} - {{- end }} -{{- end }} {{- end }} {{- end }} {{- if $.Values.configSecret.name }} diff --git a/hack/charts/cluster-api-operator/templates/core.yaml b/hack/charts/cluster-api-operator/templates/core.yaml index 2d0d8b76c..8f993496f 100644 --- a/hack/charts/cluster-api-operator/templates/core.yaml +++ b/hack/charts/cluster-api-operator/templates/core.yaml @@ -38,7 +38,7 @@ metadata: "helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook-weight": "2" "argocd.argoproj.io/sync-wave": "2" -{{- if or $coreVersion $.Values.configSecret.name }} +{{- if or $coreVersion $.Values.configSecret.name $.Values.manager }} spec: {{- end}} {{- if $coreVersion }} diff --git a/hack/charts/cluster-api-operator/values.yaml b/hack/charts/cluster-api-operator/values.yaml index 1d2fb0cc5..8b55b2fd8 100644 --- a/hack/charts/cluster-api-operator/values.yaml +++ b/hack/charts/cluster-api-operator/values.yaml @@ -6,7 +6,17 @@ bootstrap: "" controlPlane: "" infrastructure: "" addon: "" -manager.featureGates: {} +manager: + featureGates: {} +# e.g. +# manager: +# featureGates: +# core: +# KubeadmBootstrapFormatIgnition: true +# bootstrap: +# KubeadmBootstrapFormatIgnition: true +# controlPlane: +# KubeadmBootstrapFormatIgnition: true # --- # Common configuration secret options configSecret: {}