Skip to content

Commit e1a95f4

Browse files
committed
features: add installer replacement feature gates
Installer feature gates need to have "install" in the title for the test analyzer. This commit adds feature gates for AWSClusterHostedDNSInstall, GCPClusterHostedDNSInstall, and GCPCustomAPIEndpointsInstall to replace their counterparts without the -install suffix, which will be removed in a follow up PR.
1 parent f313adb commit e1a95f4

26 files changed

+1089
-16
lines changed

config/v1/tests/infrastructures.config.openshift.io/AAA_ungated.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if w
22
name: "Infrastructure"
33
crdName: infrastructures.config.openshift.io
44
featureGates:
5-
- -AWSClusterHostedDNS
5+
- -AWSClusterHostedDNSInstall
66
tests:
77
onCreate:
88
- name: Should be able to create a minimal Infrastructure

config/v1/tests/infrastructures.config.openshift.io/AWSClusterHostedDNS.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if w
22
name: "Infrastructure"
33
crdName: infrastructures.config.openshift.io
44
featureGates:
5-
- AWSClusterHostedDNS
5+
- AWSClusterHostedDNSInstall
66
tests:
77
onCreate:
88
- name: Should be able to create a minimal Infrastructure
Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
2+
name: "Infrastructure"
3+
crdName: infrastructures.config.openshift.io
4+
featureGates:
5+
- AWSClusterHostedDNSInstall
6+
tests:
7+
onCreate:
8+
- name: Should be able to create a minimal Infrastructure
9+
initial: |
10+
apiVersion: config.openshift.io/v1
11+
kind: Infrastructure
12+
spec: {} # No spec is required for a Infrastructure
13+
expected: |
14+
apiVersion: config.openshift.io/v1
15+
kind: Infrastructure
16+
spec: {}
17+
onUpdate:
18+
- name: dnsType should default to `PlatformDefault` when not specified
19+
initial: |
20+
apiVersion: config.openshift.io/v1
21+
kind: Infrastructure
22+
spec:
23+
platformSpec:
24+
aws: {}
25+
type: AWS
26+
status:
27+
controlPlaneTopology: HighlyAvailable
28+
infrastructureTopology: HighlyAvailable
29+
platform: AWS
30+
platformStatus:
31+
aws: {}
32+
type: AWS
33+
updated: |
34+
apiVersion: config.openshift.io/v1
35+
kind: Infrastructure
36+
spec:
37+
platformSpec:
38+
type: AWS
39+
aws: {}
40+
status:
41+
controlPlaneTopology: HighlyAvailable
42+
infrastructureTopology: HighlyAvailable
43+
platform: AWS
44+
platformStatus:
45+
aws: {}
46+
type: AWS
47+
expected: |
48+
apiVersion: config.openshift.io/v1
49+
kind: Infrastructure
50+
spec:
51+
platformSpec:
52+
type: AWS
53+
aws: {}
54+
status:
55+
controlPlaneTopology: HighlyAvailable
56+
cpuPartitioning: None
57+
infrastructureTopology: HighlyAvailable
58+
platform: AWS
59+
platformStatus:
60+
aws:
61+
cloudLoadBalancerConfig:
62+
dnsType: PlatformDefault
63+
type: AWS
64+
- name: should be able to set dnsType to non-default value of `ClusterHosted`
65+
initial: |
66+
apiVersion: config.openshift.io/v1
67+
kind: Infrastructure
68+
spec:
69+
platformSpec:
70+
aws: {}
71+
type: AWS
72+
updated: |
73+
apiVersion: config.openshift.io/v1
74+
kind: Infrastructure
75+
spec:
76+
platformSpec:
77+
type: AWS
78+
aws: {}
79+
status:
80+
controlPlaneTopology: HighlyAvailable
81+
infrastructureTopology: HighlyAvailable
82+
platform: AWS
83+
platformStatus:
84+
aws:
85+
cloudLoadBalancerConfig:
86+
dnsType: ClusterHosted
87+
type: AWS
88+
expected: |
89+
apiVersion: config.openshift.io/v1
90+
kind: Infrastructure
91+
spec:
92+
platformSpec:
93+
type: AWS
94+
aws: {}
95+
status:
96+
controlPlaneTopology: HighlyAvailable
97+
cpuPartitioning: None
98+
infrastructureTopology: HighlyAvailable
99+
platform: AWS
100+
platformStatus:
101+
aws:
102+
cloudLoadBalancerConfig:
103+
dnsType: ClusterHosted
104+
type: AWS
105+
- name: Should not allow changing the immutable dnsType field
106+
initial: |
107+
apiVersion: config.openshift.io/v1
108+
kind: Infrastructure
109+
spec:
110+
platformSpec:
111+
aws: {}
112+
type: AWS
113+
status:
114+
controlPlaneTopology: HighlyAvailable
115+
infrastructureTopology: HighlyAvailable
116+
platform: AWS
117+
platformStatus:
118+
aws:
119+
cloudLoadBalancerConfig:
120+
dnsType: ClusterHosted
121+
clusterHosted:
122+
apiIntLoadBalancerIPs:
123+
- 10.10.10.20
124+
type: AWS
125+
updated: |
126+
apiVersion: config.openshift.io/v1
127+
kind: Infrastructure
128+
spec:
129+
platformSpec:
130+
type: AWS
131+
aws: {}
132+
status:
133+
controlPlaneTopology: HighlyAvailable
134+
infrastructureTopology: HighlyAvailable
135+
platform: AWS
136+
platformStatus:
137+
aws:
138+
cloudLoadBalancerConfig:
139+
dnsType: PlatformDefault
140+
type: AWS
141+
expectedStatusError: "status.platformStatus.aws.cloudLoadBalancerConfig.dnsType: Invalid value: \"string\": dnsType is immutable"
142+
- name: Should not accept non-IP address values for Load Balancer IPs
143+
initial: |
144+
apiVersion: config.openshift.io/v1
145+
kind: Infrastructure
146+
spec:
147+
platformSpec:
148+
aws: {}
149+
type: AWS
150+
status:
151+
controlPlaneTopology: HighlyAvailable
152+
infrastructureTopology: HighlyAvailable
153+
platform: AWS
154+
platformStatus:
155+
aws:
156+
cloudLoadBalancerConfig:
157+
dnsType: ClusterHosted
158+
clusterHosted:
159+
apiIntLoadBalancerIPs:
160+
- 10.10.10.20
161+
type: AWS
162+
updated: |
163+
apiVersion: config.openshift.io/v1
164+
kind: Infrastructure
165+
spec:
166+
platformSpec:
167+
type: AWS
168+
aws: {}
169+
status:
170+
controlPlaneTopology: HighlyAvailable
171+
infrastructureTopology: HighlyAvailable
172+
platform: AWS
173+
platformStatus:
174+
aws:
175+
cloudLoadBalancerConfig:
176+
dnsType: ClusterHosted
177+
clusterHosted:
178+
apiIntLoadBalancerIPs:
179+
- 10.10.10.20
180+
- not-an-ip-address
181+
type: AWS
182+
expectedStatusError: "status.platformStatus.aws.cloudLoadBalancerConfig.clusterHosted.apiIntLoadBalancerIPs[1]: Invalid value: \"string\": value must be a valid IP address"
183+
- name: Should not accept update when `clusterHosted` is specified with DNSType `PlatformDefault`
184+
initial: |
185+
apiVersion: config.openshift.io/v1
186+
kind: Infrastructure
187+
spec:
188+
platformSpec:
189+
aws: {}
190+
type: AWS
191+
status:
192+
controlPlaneTopology: HighlyAvailable
193+
infrastructureTopology: HighlyAvailable
194+
platform: AWS
195+
platformStatus:
196+
aws: {}
197+
type: AWS
198+
updated: |
199+
apiVersion: config.openshift.io/v1
200+
kind: Infrastructure
201+
spec:
202+
platformSpec:
203+
type: AWS
204+
aws: {}
205+
status:
206+
controlPlaneTopology: HighlyAvailable
207+
infrastructureTopology: HighlyAvailable
208+
platform: AWS
209+
platformStatus:
210+
aws:
211+
cloudLoadBalancerConfig:
212+
dnsType: PlatformDefault
213+
clusterHosted:
214+
apiIntLoadBalancerIPs:
215+
- 10.10.10.20
216+
type: AWS
217+
expectedStatusError: "status.platformStatus.aws.cloudLoadBalancerConfig: Invalid value: \"object\": clusterHosted is permitted only when dnsType is ClusterHosted"
218+
- name: Should not accept duplicate IP addresses for any of the Load Balancer IPs
219+
initial: |
220+
apiVersion: config.openshift.io/v1
221+
kind: Infrastructure
222+
spec:
223+
platformSpec:
224+
aws: {}
225+
type: AWS
226+
updated: |
227+
apiVersion: config.openshift.io/v1
228+
kind: Infrastructure
229+
spec:
230+
platformSpec:
231+
type: AWS
232+
aws: {}
233+
status:
234+
controlPlaneTopology: HighlyAvailable
235+
infrastructureTopology: HighlyAvailable
236+
platform: AWS
237+
platformStatus:
238+
aws:
239+
cloudLoadBalancerConfig:
240+
dnsType: ClusterHosted
241+
clusterHosted:
242+
apiIntLoadBalancerIPs:
243+
- 10.10.10.20
244+
- 10.10.20.20
245+
- 10.10.10.20
246+
type: AWS
247+
expectedStatusError: "status.platformStatus.aws.cloudLoadBalancerConfig.clusterHosted.apiIntLoadBalancerIPs[2]: Duplicate value: \"10.10.10.20\""

config/v1/tests/infrastructures.config.openshift.io/GCPClusterHostedDNS.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if w
22
name: "Infrastructure"
33
crdName: infrastructures.config.openshift.io
44
featureGates:
5-
- GCPClusterHostedDNS
5+
- GCPClusterHostedDNSInstall
66
tests:
77
onCreate:
88
- name: Should be able to create a minimal Infrastructure

0 commit comments

Comments
 (0)