Skip to content

Commit 07d1080

Browse files
authored
Merge pull request #735 from afarbos/af/NoFeatureGateCPDefault
🐛 avoid empty manager field in ControlPlaneProvider when no controlPlane and no features gates provided
2 parents d59b57d + b344000 commit 07d1080

File tree

8 files changed

+6
-17
lines changed

8 files changed

+6
-17
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,8 +45,8 @@ spec:
4545
version: {{ $coreVersion }}
4646
{{- end }}
4747
{{- if $.Values.manager }}
48-
manager:
4948
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.core }}
49+
manager:
5050
featureGates:
5151
{{- range $key, $value := $.Values.manager.featureGates.core }}
5252
{{ $key }}: {{ $value }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ metadata:
5454
{{- with .Values.configSecret }}
5555
spec:
5656
{{- if $.Values.manager }}
57-
manager:
5857
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.kubeadm }}
58+
manager:
5959
featureGates:
6060
{{- range $key, $value := $.Values.manager.featureGates.kubeadm }}
6161
{{ $key }}: {{ $value }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ spec:
4747
version: {{ $infrastructureVersion }}
4848
{{- end }}
4949
{{- if $.Values.manager }}
50-
manager:
5150
{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $infrastructureName) }}
51+
manager:
5252
{{- range $key, $value := $.Values.manager.featureGates }}
5353
{{- if eq $key $infrastructureName }}
5454
featureGates:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ spec:
4747
version: {{ $ipamVersion }}
4848
{{- end }}
4949
{{- if $.Values.manager }}
50-
manager:
5150
{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $ipamName) }}
51+
manager:
5252
{{- range $key, $value := $.Values.manager.featureGates }}
5353
{{- if eq $key $ipamName }}
5454
featureGates:

test/e2e/resources/all-providers-manager-defined-no-feature-gates.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ metadata:
9595
"helm.sh/hook-weight": "2"
9696
"argocd.argoproj.io/sync-wave": "2"
9797
spec:
98-
manager:
9998
configSecret:
10099
name: test-secret-name
101100
namespace: test-secret-namespace
@@ -111,7 +110,6 @@ metadata:
111110
"helm.sh/hook-weight": "2"
112111
"argocd.argoproj.io/sync-wave": "2"
113112
spec:
114-
manager:
115113
configSecret:
116114
name: test-secret-name
117115
namespace: test-secret-namespace
@@ -127,7 +125,6 @@ metadata:
127125
"helm.sh/hook-weight": "2"
128126
"argocd.argoproj.io/sync-wave": "2"
129127
spec:
130-
manager:
131128
configSecret:
132129
name: test-secret-name
133130
namespace: test-secret-namespace
@@ -143,7 +140,6 @@ metadata:
143140
"helm.sh/hook-weight": "2"
144141
"argocd.argoproj.io/sync-wave": "2"
145142
spec:
146-
manager:
147143
configSecret:
148144
name: test-secret-name
149145
namespace: test-secret-namespace

test/e2e/resources/feature-gates.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ metadata:
9595
"helm.sh/hook-weight": "2"
9696
"argocd.argoproj.io/sync-wave": "2"
9797
spec:
98-
manager:
9998
configSecret:
10099
name: aws-variables
101100
namespace: default
@@ -131,7 +130,6 @@ metadata:
131130
"helm.sh/hook-weight": "2"
132131
"argocd.argoproj.io/sync-wave": "2"
133132
spec:
134-
manager:
135133
configSecret:
136134
name: aws-variables
137135
namespace: default

test/e2e/resources/kubeadm-manager-defined.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ metadata:
103103
"helm.sh/hook-weight": "2"
104104
"argocd.argoproj.io/sync-wave": "2"
105105
spec:
106-
manager:
107106
---
108107
# Source: cluster-api-operator/templates/ipam.yaml
109108
apiVersion: operator.cluster.x-k8s.io/v1alpha2
@@ -116,7 +115,6 @@ metadata:
116115
"helm.sh/hook-weight": "2"
117116
"argocd.argoproj.io/sync-wave": "2"
118117
spec:
119-
manager:
120118
---
121119
# Source: cluster-api-operator/templates/infra.yaml
122120
apiVersion: operator.cluster.x-k8s.io/v1alpha2
@@ -128,5 +126,4 @@ metadata:
128126
"helm.sh/hook": "post-install,post-upgrade"
129127
"helm.sh/hook-weight": "2"
130128
"argocd.argoproj.io/sync-wave": "2"
131-
spec:
132-
manager:
129+
spec:

test/e2e/resources/manager-defined-missing-other-infra-spec.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ metadata:
115115
"helm.sh/hook-weight": "2"
116116
"argocd.argoproj.io/sync-wave": "2"
117117
spec:
118-
manager:
119118
---
120119
# Source: cluster-api-operator/templates/infra.yaml
121120
apiVersion: operator.cluster.x-k8s.io/v1alpha2
@@ -127,5 +126,4 @@ metadata:
127126
"helm.sh/hook": "post-install,post-upgrade"
128127
"helm.sh/hook-weight": "2"
129128
"argocd.argoproj.io/sync-wave": "2"
130-
spec:
131-
manager:
129+
spec:

0 commit comments

Comments
 (0)