Skip to content

Commit fda05db

Browse files
committed
Add multi-namespace SKMO support for Barbican cross-region listener
Configure the multi-namespace SKMO scenario with: - SKMO-specific control-plane kustomization for the central region with barbican-keystone-listener pool_name and RabbitMQ memory reduction (4Gi -> 2Gi) for compact clusters - Barbican keystone listener pool_name configuration for both central (regionOne) and leaf (regionTwo) regions - Automation stages updated to reference SKMO-specific paths - Post-stage hook for populating cross-region transport URL - Wait conditions adjusted for parallel deployment - Correct keystone endpoint values for leaf region - CA trust configuration between central and leaf regions
1 parent d357cef commit fda05db

File tree

12 files changed

+477
-1
lines changed

12 files changed

+477
-1
lines changed

.ci/validate-schema-paths.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def __validate(self, scenario):
3838
print('[OK]')
3939
for val in stage['values']:
4040
f = val['src_file']
41-
_path = source / f
41+
# Allow src_file paths to traverse outside the stage path
42+
_path = (source / f).resolve()
4243
print(f' Checking source file: {_path}', end=' ')
4344
assert _path.is_file(), f'!! {_path} does not exist'
4445
print('[OK]')
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
multi-namespace.yaml
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
---
2+
vas:
3+
multi-namespace-skmo:
4+
stages:
5+
- name: namespace-configuration # stage 0
6+
path: examples/va/multi-namespace/namespace
7+
wait_conditions:
8+
- >-
9+
oc -n default wait ns openstack2
10+
--for jsonpath='{.status.phase}'=Active
11+
--timeout=5m
12+
values:
13+
- name: namespace-values
14+
src_file: values.yaml
15+
build_output: namespace.yaml
16+
17+
- name: nncp-configuration # stage 1
18+
path: examples/va/multi-namespace/control-plane/networking/nncp
19+
wait_conditions:
20+
# We don't wait for these NNCPs at this stage, because we'll wait for
21+
# both namespaces in the next stage so that they can deploy in parallel
22+
# to save time
23+
- >-
24+
oc -n default wait ns openstack2
25+
--for jsonpath='{.status.phase}'=Active
26+
--timeout=5m
27+
values:
28+
- name: network-values
29+
src_file: values.yaml
30+
build_output: nncp.yaml
31+
32+
- name: nncp-configuration2 # stage 2
33+
path: examples/va/multi-namespace/control-plane2/networking/nncp
34+
wait_conditions:
35+
- >-
36+
oc -n openstack wait nncp
37+
-l osp/nncm-config-type=standard
38+
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
39+
--timeout=5m
40+
values:
41+
- name: network-values2
42+
src_file: values.yaml
43+
build_output: nncp2.yaml
44+
45+
- name: network-configuration # stage 3
46+
path: examples/va/multi-namespace/control-plane/networking
47+
wait_conditions:
48+
- >-
49+
oc -n metallb-system wait pod
50+
-l app=metallb -l component=speaker
51+
--for condition=Ready
52+
--timeout=5m
53+
values:
54+
- name: network-values
55+
src_file: nncp/values.yaml
56+
build_output: network.yaml
57+
58+
- name: network-configuration2 # stage 4
59+
path: examples/va/multi-namespace/control-plane2/networking
60+
wait_conditions:
61+
- >-
62+
oc -n metallb-system wait pod
63+
-l app=metallb -l component=speaker
64+
--for condition=Ready
65+
--timeout=5m
66+
values:
67+
- name: network-values2
68+
src_file: nncp/values.yaml
69+
build_output: network2.yaml
70+
71+
- name: control-plane # stage 5
72+
path: examples/va/multi-namespace-skmo/control-plane
73+
wait_conditions:
74+
# Just confirm the central OSCP CR exists in the API server.
75+
# The pre_stage_run of stage 6 (prepare-leaf.yaml) will use
76+
# Ansible retry logic to wait for Keystone and openstackclient
77+
# readiness before proceeding, allowing parallel deployment.
78+
- >-
79+
oc -n openstack wait osctlplane controlplane
80+
--for jsonpath='{.metadata.name}'=controlplane
81+
--timeout=5m
82+
values:
83+
- name: service-values
84+
src_file: service-values.yaml
85+
- name: network-values
86+
src_file: ../../multi-namespace/control-plane/networking/nncp/values.yaml
87+
build_output: ../control-plane.yaml
88+
89+
- pre_stage_run: # stage 6
90+
- name: Prepare SKMO leaf prerequisites in regionZero
91+
type: playbook
92+
source: "../../playbooks/skmo/prepare-leaf.yaml"
93+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
94+
name: control-plane2 # stage 6
95+
path: examples/va/multi-namespace-skmo/control-plane2
96+
wait_conditions:
97+
- >-
98+
oc -n openstack wait osctlplane controlplane --for condition=Ready
99+
--timeout=60m
100+
- >-
101+
oc -n openstack2 wait osctlplane controlplane --for condition=Ready
102+
--timeout=60m
103+
values:
104+
- name: service-values
105+
src_file: service-values.yaml
106+
- name: network-values2
107+
src_file: ../../multi-namespace/control-plane2/networking/nncp/values.yaml
108+
build_output: ../control-plane2.yaml
109+
post_stage_run:
110+
- name: Trust leaf region CA in central region
111+
type: playbook
112+
source: "../../playbooks/skmo/trust-leaf-ca.yaml"
113+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
114+
- name: Ensure central control plane uses custom CA bundle
115+
type: playbook
116+
source: "../../playbooks/skmo/ensure-central-ca-bundle.yaml"
117+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
118+
- name: Configure barbican-keystone-listener transport URL for leaf region
119+
type: playbook
120+
source: "../../playbooks/skmo/configure-leaf-listener.yaml"
121+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
122+
123+
- name: edpm-nodeset # stage 7
124+
path: examples/va/multi-namespace/edpm/nodeset
125+
wait_conditions:
126+
# We don't wait for this namespace's OpenStackDataPlaneNodeSet at
127+
# this stage, because we'll wait for both namespaces in the next
128+
# stage so that they can deploy in parallel to save time
129+
- >-
130+
oc -n default wait ns openstack2
131+
--for jsonpath='{.status.phase}'=Active
132+
--timeout=5m
133+
values:
134+
- name: edpm-nodeset-values
135+
src_file: values.yaml
136+
build_output: nodeset.yaml
137+
138+
- pre_stage_run: # stage 8
139+
- name: Get OpenStackDataPlaneServices for openstack2 namespace
140+
type: playbook
141+
source: "../../playbooks/multi-namespace/ns2_osdp_services.yaml"
142+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
143+
name: edpm-nodeset2
144+
path: examples/va/multi-namespace/edpm2/nodeset
145+
wait_conditions:
146+
- >-
147+
oc -n openstack wait
148+
osdpns openstack-edpm --for condition=SetupReady
149+
--timeout=10m
150+
- >-
151+
oc -n openstack2 wait
152+
osdpns openstack-edpm --for condition=SetupReady
153+
--timeout=10m
154+
values:
155+
- name: edpm-nodeset2-values
156+
src_file: values.yaml
157+
build_output: nodeset2.yaml
158+
159+
- name: edpm-deployment # stage 9
160+
path: examples/va/multi-namespace/edpm
161+
wait_conditions:
162+
# We don't wait for this namespace's OpenStackDataPlaneDeployment at
163+
# this stage, because we'll wait for both namespaces in the next
164+
# stage so that they can deploy in parallel to save time
165+
- >-
166+
oc -n default wait ns openstack2
167+
--for jsonpath='{.status.phase}'=Active
168+
--timeout=5m
169+
values:
170+
- name: edpm-deployment-values
171+
src_file: values.yaml
172+
build_output: deployment.yaml
173+
174+
- name: edpm-deployment2 # stage 10
175+
path: examples/va/multi-namespace/edpm2
176+
wait_conditions:
177+
- >-
178+
oc -n openstack wait
179+
osdpns openstack-edpm --for condition=Ready
180+
--timeout=60m
181+
- >-
182+
oc -n openstack2 wait
183+
osdpns openstack-edpm --for condition=Ready
184+
--timeout=60m
185+
values:
186+
- name: edpm-deployment2-values
187+
src_file: values.yaml
188+
build_output: deployment2.yaml
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace.yaml
2+
nncp.yaml
3+
nncp2.yaml
4+
networking.yaml
5+
networking2.yaml
6+
control-plane.yaml
7+
control-plane2.yaml
8+
nodeset.yaml
9+
nodeset2.yaml
10+
deployment.yaml
11+
deployment2.yaml
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
4+
5+
components:
6+
- ../../multi-namespace/control-plane
7+
8+
patches:
9+
- target:
10+
kind: ConfigMap
11+
name: service-values
12+
path: service-values.yaml
13+
- target:
14+
group: core.openstack.org
15+
version: v1beta1
16+
kind: OpenStackControlPlane
17+
name: controlplane
18+
patch: |-
19+
- op: replace
20+
path: /spec/rabbitmq/templates/rabbitmq/resources/requests/memory
21+
value: 2Gi
22+
- op: replace
23+
path: /spec/rabbitmq/templates/rabbitmq/resources/limits/memory
24+
value: 2Gi
25+
- op: replace
26+
path: /spec/rabbitmq/templates/rabbitmq-cell1/resources/requests/memory
27+
value: 2Gi
28+
- op: replace
29+
path: /spec/rabbitmq/templates/rabbitmq-cell1/resources/limits/memory
30+
value: 2Gi
31+
32+
replacements:
33+
- source:
34+
kind: ConfigMap
35+
name: service-values
36+
fieldPath: data.barbican.barbicanKeystoneListener.customServiceConfig
37+
targets:
38+
- select:
39+
kind: OpenStackControlPlane
40+
fieldPaths:
41+
- spec.barbican.template.barbicanKeystoneListener.customServiceConfig
42+
options:
43+
create: true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: service-values
6+
annotations:
7+
config.kubernetes.io/local-config: "true"
8+
data:
9+
tls:
10+
caBundleSecretName: custom-ca-certs
11+
barbican:
12+
barbicanKeystoneListener:
13+
customServiceConfig: |
14+
[keystone_notifications]
15+
pool_name = barbican-listener-regionOne
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nncp2.yaml
2+
networking2.yaml
3+
control-plane2.yaml

0 commit comments

Comments
 (0)