Skip to content

Commit 92f0294

Browse files
committed
Fix helm chart logic
1 parent fab98f2 commit 92f0294

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
{{- end }}
4646
{{- if $.Values.manager }}
4747
manager:
48-
{{- if $.Values.manager.featureGates.core }}
48+
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.core }}
4949
featureGates:
5050
{{- range $key, $value := $.Values.manager.featureGates.core }}
5151
{{ $key }}: {{ $value }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ metadata:
3838
annotations:
3939
"helm.sh/hook": "post-install"
4040
"helm.sh/hook-weight": "2"
41-
{{- if or $infrastructureVersion $.Values.configSecret.name }}
41+
{{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager }}
4242
spec:
4343
{{- end }}
4444
{{- if $infrastructureVersion }}
4545
version: {{ $infrastructureVersion }}
4646
{{- end }}
4747
{{- if $.Values.manager }}
4848
manager:
49-
{{- if hasKey $.Values.manager.featureGates $infrastructureName }}
49+
{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $infrastructureName) }}
5050
{{- range $key, $value := $.Values.manager.featureGates }}
5151
{{- if eq $key $infrastructureName }}
5252
featureGates:

0 commit comments

Comments
 (0)