Skip to content

Commit b9d3574

Browse files
committed
Prune certain services from three KUTTL tests
1 parent a77f462 commit b9d3574

File tree

7 files changed

+289
-130
lines changed

7 files changed

+289
-130
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
set -x
3+
4+
OSCTLPLANE=${1:-}
5+
SERVICE_LIST=${2:-}
6+
SERVICE_ENABLED=${3:-true}
7+
8+
if [ -z "$OSCTLPLANE" ]; then
9+
echo "ERROR: OpenStackControlPlane name (arg 1) is required"
10+
exit 1
11+
fi
12+
13+
SERVICE_PATCH='['
14+
15+
IFS=',' read -ra array <<< "$SERVICE_LIST"
16+
for i in "${!array[@]}"; do
17+
if [ "$i" -gt 0 ]; then
18+
SERVICE_PATCH+=','
19+
fi
20+
SERVICE_PATCH+='{"op":"replace","path":"/spec/'"${array[$i]}"'/enabled",'
21+
SERVICE_PATCH+='"value":'"${SERVICE_ENABLED}"'}'
22+
done
23+
24+
SERVICE_PATCH+=']'
25+
26+
if [ "$SERVICE_PATCH" != '[]' ]; then
27+
oc patch openstackcontrolplane "${OSCTLPLANE}" -n "${NAMESPACE}" --type=json -p="${SERVICE_PATCH}"
28+
fi
29+

test/kuttl/tests/ctlplane-basic-deployment-with-nicMappings/02-assert-deploy-openstack.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
apiVersion: core.openstack.org/v1beta1
2+
kind: OpenStackControlPlane
3+
metadata:
4+
name: openstack
5+
spec:
6+
secret: osp-secret
7+
keystone:
8+
template:
9+
databaseInstance: openstack
10+
secret: osp-secret
11+
galera:
12+
enabled: true
13+
templates:
14+
openstack:
15+
storageRequest: 500M
16+
secret: osp-secret
17+
replicas: 1
18+
openstack-cell1:
19+
storageRequest: 500M
20+
secret: osp-secret
21+
replicas: 1
22+
rabbitmq:
23+
templates:
24+
rabbitmq:
25+
replicas: 1
26+
rabbitmq-cell1:
27+
replicas: 1
28+
memcached:
29+
templates:
30+
memcached:
31+
replicas: 1
32+
placement:
33+
template:
34+
databaseInstance: openstack
35+
secret: osp-secret
36+
glance:
37+
template:
38+
databaseInstance: openstack
39+
secret: osp-secret
40+
glanceAPIs:
41+
default:
42+
replicas: 1
43+
storage:
44+
storageRequest: 10G
45+
manila:
46+
template:
47+
manilaAPI:
48+
replicas: 1
49+
manilaScheduler:
50+
replicas: 1
51+
manilaShares:
52+
share1:
53+
replicas: 1
54+
ovn:
55+
template:
56+
ovnDBCluster:
57+
ovndbcluster-nb:
58+
replicas: 1
59+
dbType: NB
60+
storageRequest: 10G
61+
ovndbcluster-sb:
62+
replicas: 1
63+
dbType: SB
64+
storageRequest: 10G
65+
ovnNorthd:
66+
replicas: 1
67+
ovnController:
68+
external-ids:
69+
system-id: "random"
70+
ovn-bridge: "br-int"
71+
ovn-encap-type: "geneve"
72+
neutron:
73+
template:
74+
databaseInstance: openstack
75+
secret: osp-secret
76+
horizon:
77+
template:
78+
replicas: 1
79+
secret: osp-secret
80+
nova:
81+
template:
82+
secret: osp-secret
83+
heat:
84+
enabled: false
85+
template:
86+
databaseInstance: openstack
87+
heatAPI:
88+
replicas: 1
89+
heatEngine:
90+
replicas: 1
91+
secret: osp-secret
92+
octavia:
93+
enabled: false
94+
template:
95+
databaseInstance: openstack
96+
octaviaAPI:
97+
replicas: 1
98+
secret: osp-secret
99+
ironic:
100+
enabled: false
101+
template:
102+
databaseInstance: openstack
103+
ironicAPI:
104+
replicas: 1
105+
ironicConductors:
106+
- replicas: 1
107+
storageRequest: 10G
108+
ironicInspector:
109+
replicas: 1
110+
ironicNeutronAgent:
111+
replicas: 1
112+
secret: osp-secret
113+
designate:
114+
enabled: false
115+
template:
116+
databaseInstance: openstack
117+
secret: osp-secret
118+
designateAPI:
119+
replicas: 1
120+
designateCentral:
121+
replicas: 1
122+
designateMdns:
123+
replicas: 1
124+
designateWorker:
125+
replicas: 1
126+
designateProducer:
127+
replicas: 1
128+
designateBackendbind9:
129+
replicas: 1
130+
tls:
131+
ingress:
132+
ca:
133+
duration: 87600h0m0s
134+
cert:
135+
duration: 43800h0m0s
136+
enabled: true
137+
podLevel:
138+
enabled: true
139+
internal:
140+
ca:
141+
duration: 87600h0m0s
142+
cert:
143+
duration: 43800h0m0s
144+
libvirt:
145+
ca:
146+
duration: 87600h0m0s
147+
cert:
148+
duration: 43800h0m0s
149+
ovn:
150+
ca:
151+
duration: 87600h0m0s
152+
cert:
153+
duration: 43800h0m0s
154+
status:
155+
conditions:
156+
- message: Setup complete
157+
reason: Ready
158+
status: "True"
159+
type: Ready
160+
- message: OpenStackControlPlane CAs completed
161+
reason: Ready
162+
status: "True"
163+
type: OpenStackControlPlaneCAReadyCondition
164+
- message: OpenStackControlPlane Client completed
165+
reason: Ready
166+
status: "True"
167+
type: OpenStackControlPlaneClientReady
168+
- message: OpenStackControlPlane glance service exposed
169+
reason: Ready
170+
status: "True"
171+
type: OpenStackControlPlaneExposeGlanceReady
172+
- message: OpenStackControlPlane keystone service exposed
173+
reason: Ready
174+
status: "True"
175+
type: OpenStackControlPlaneExposeKeystoneAPIReady
176+
- message: OpenStackControlPlane neutron service exposed
177+
reason: Ready
178+
status: "True"
179+
type: OpenStackControlPlaneExposeNeutronReady
180+
- message: OpenStackControlPlane nova service exposed
181+
reason: Ready
182+
status: "True"
183+
type: OpenStackControlPlaneExposeNovaReady
184+
- message: OpenStackControlPlane placement service exposed
185+
reason: Ready
186+
status: "True"
187+
type: OpenStackControlPlaneExposePlacementAPIReady
188+
- message: OpenStackControlPlane Glance completed
189+
reason: Ready
190+
status: "True"
191+
type: OpenStackControlPlaneGlanceReady
192+
- message: OpenStackControlPlane InstanceHa CM is available
193+
reason: Ready
194+
status: "True"
195+
type: OpenStackControlPlaneInstanceHaCMReadyCondition
196+
- message: OpenStackControlPlane KeystoneAPI completed
197+
reason: Ready
198+
status: "True"
199+
type: OpenStackControlPlaneKeystoneAPIReady
200+
- message: OpenStackControlPlane MariaDB completed
201+
reason: Ready
202+
status: "True"
203+
type: OpenStackControlPlaneMariaDBReady
204+
- message: OpenStackControlPlane Memcached completed
205+
reason: Ready
206+
status: "True"
207+
type: OpenStackControlPlaneMemcachedReady
208+
- message: OpenStackControlPlane Neutron completed
209+
reason: Ready
210+
status: "True"
211+
type: OpenStackControlPlaneNeutronReady
212+
- message: OpenStackControlPlane Nova completed
213+
reason: Ready
214+
status: "True"
215+
type: OpenStackControlPlaneNovaReady
216+
- message: OpenStackControlPlane OVN completed
217+
reason: Ready
218+
status: "True"
219+
type: OpenStackControlPlaneOVNReady
220+
- message: OpenStackControlPlane OpenStackVersion initialized
221+
reason: Ready
222+
status: "True"
223+
type: OpenStackControlPlaneOpenStackVersionInitializationReadyCondition
224+
- message: OpenStackControlPlane PlacementAPI completed
225+
reason: Ready
226+
status: "True"
227+
type: OpenStackControlPlanePlacementAPIReady
228+
- message: OpenStackControlPlane RabbitMQ completed
229+
reason: Ready
230+
status: "True"
231+
type: OpenStackControlPlaneRabbitMQReady
232+
- message: OpenStackControlPlane Test Operator CM is available
233+
reason: Ready
234+
status: "True"
235+
type: OpenStackControlPlaneTestCMReadyCondition

test/kuttl/tests/ctlplane-basic-deployment-with-nicMappings/02-deploy-openstack.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ kind: TestStep
33
commands:
44
- script: |
55
oc kustomize ../../../../config/samples/base/openstackcontrolplane | oc apply -n $NAMESPACE -f -
6+
- script: |
7+
# Disable the services that are not needed for the test (these are also already covered in the ctlplane-basic-deployment test)
8+
NAMESPACE=$NAMESPACE ../../common/toggle_services.sh openstack "barbican,cinder,swift,telemetry" false

test/kuttl/tests/ctlplane-collapsed/01-assert-collapsed-cell.yaml

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,6 @@ spec:
3232
replicas: 1
3333
storage:
3434
storageRequest: 10G
35-
cinder:
36-
template:
37-
databaseInstance: openstack
38-
secret: osp-secret
39-
cinderAPI:
40-
replicas: 1
41-
cinderScheduler:
42-
replicas: 1
43-
cinderBackup:
44-
replicas: 0 # backend needs to be configured
45-
cinderVolumes:
46-
volume1:
47-
replicas: 0 # backend needs to be configured
4835
ovn:
4936
template:
5037
ovnDBCluster:
@@ -114,26 +101,6 @@ spec:
114101
ceilometerService: CeilometerPassword
115102
secret: osp-secret
116103
serviceUser: ceilometer
117-
barbican:
118-
enabled: true
119-
template:
120-
databaseInstance: openstack
121-
secret: osp-secret
122-
barbicanAPI:
123-
replicas: 1
124-
barbicanWorker:
125-
replicas: 1
126-
barbicanKeystoneListener:
127-
replicas: 1
128-
swift:
129-
enabled: true
130-
template:
131-
swiftRing:
132-
ringReplicas: 1
133-
swiftStorage:
134-
replicas: 1
135-
swiftProxy:
136-
replicas: 1
137104
tls:
138105
ingress:
139106
ca:
@@ -175,30 +142,14 @@ status:
175142
reason: Ready
176143
status: "True"
177144
type: Ready
178-
- message: OpenStackControlPlane Barbican completed
179-
reason: Ready
180-
status: "True"
181-
type: OpenStackControlPlaneBarbicanReady
182145
- message: OpenStackControlPlane CAs completed
183146
reason: Ready
184147
status: "True"
185148
type: OpenStackControlPlaneCAReadyCondition
186-
- message: OpenStackControlPlane Cinder completed
187-
reason: Ready
188-
status: "True"
189-
type: OpenStackControlPlaneCinderReady
190149
- message: OpenStackControlPlane Client completed
191150
reason: Ready
192151
status: "True"
193152
type: OpenStackControlPlaneClientReady
194-
- message: OpenStackControlPlane barbican service exposed
195-
reason: Ready
196-
status: "True"
197-
type: OpenStackControlPlaneExposeBarbicanReady
198-
- message: OpenStackControlPlane cinder service exposed
199-
reason: Ready
200-
status: "True"
201-
type: OpenStackControlPlaneExposeCinderReady
202153
- message: OpenStackControlPlane glance service exposed
203154
reason: Ready
204155
status: "True"
@@ -219,10 +170,6 @@ status:
219170
reason: Ready
220171
status: "True"
221172
type: OpenStackControlPlaneExposePlacementAPIReady
222-
- message: OpenStackControlPlane swift service exposed
223-
reason: Ready
224-
status: "True"
225-
type: OpenStackControlPlaneExposeSwiftReady
226173
- message: OpenStackControlPlane watcher service exposed
227174
reason: Ready
228175
status: "True"
@@ -271,10 +218,6 @@ status:
271218
reason: Ready
272219
status: "True"
273220
type: OpenStackControlPlaneRabbitMQReady
274-
- message: OpenStackControlPlane Swift completed
275-
reason: Ready
276-
status: "True"
277-
type: OpenStackControlPlaneSwiftReady
278221
- message: OpenStackControlPlane Telemetry completed
279222
reason: Ready
280223
status: "True"

test/kuttl/tests/ctlplane-collapsed/01-deploy-openstack-collapsed-cell.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ kind: TestStep
33
commands:
44
- script: |
55
oc apply -n $NAMESPACE -f ../../../../config/samples/core_v1beta1_openstackcontrolplane_collapsed_cell.yaml
6+
- script: |
7+
# Disable the services that are not needed for the test (these are also already covered in the ctlplane-basic-deployment test)
8+
NAMESPACE=$NAMESPACE ../../common/toggle_services.sh openstack-collapsed-cell "barbican,cinder,swift" false

0 commit comments

Comments
 (0)