Skip to content

Commit a20043c

Browse files
committed
Add OVN Octavia networking for SKMO multi-region deployment
Compose SKMO overlays on multi-namespace bases with small components for Octavia NNCP, EDPM octbr bridge mappings, and network-values patches. NNCP stages reuse base values.yaml templates; octavia-network-values component keeps kustomize load-restrictor-safe paths for CI kustomize_deploy. Signed-off-by: Ade Lee <alee@redhat.com> Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f8660e9 commit a20043c

17 files changed

Lines changed: 656 additions & 8 deletions

File tree

automation/vars/multi-namespace-skmo.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ vas:
1515
build_output: namespace.yaml
1616

1717
- name: nncp-configuration # stage 1
18-
path: examples/va/multi-namespace/control-plane/networking/nncp
18+
path: examples/va/multi-namespace-skmo/control-plane/networking/nncp
1919
wait_conditions:
2020
# We don't wait for these NNCPs at this stage, because we'll wait for
2121
# both namespaces in the next stage so that they can deploy in parallel
@@ -26,20 +26,20 @@ vas:
2626
--timeout=5m
2727
values:
2828
- name: network-values
29-
src_file: values.yaml
29+
src_file: ../../../../multi-namespace/control-plane/networking/nncp/values.yaml
3030
build_output: nncp.yaml
3131

3232
- name: nncp-configuration2 # stage 2
33-
path: examples/va/multi-namespace/control-plane2/networking/nncp
33+
path: examples/va/multi-namespace-skmo/control-plane2/networking/nncp
3434
wait_conditions:
3535
- >-
36-
oc -n openstack wait nncp
36+
oc -n openstack2 wait nncp
3737
-l osp/nncm-config-type=standard
3838
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
3939
--timeout=5m
4040
values:
4141
- name: network-values2
42-
src_file: values.yaml
42+
src_file: ../../../../multi-namespace/control-plane2/networking/nncp/values.yaml
4343
build_output: nncp2.yaml
4444

4545
- name: network-configuration # stage 3
@@ -222,7 +222,7 @@ vas:
222222
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
223223

224224
- name: edpm-nodeset # stage 7
225-
path: examples/va/multi-namespace/edpm/nodeset
225+
path: examples/va/multi-namespace-skmo/edpm/nodeset
226226
wait_conditions:
227227
# We don't wait for this namespace's OpenStackDataPlaneNodeSet at
228228
# this stage, because we'll wait for both namespaces in the next
@@ -242,7 +242,7 @@ vas:
242242
source: "../../playbooks/multi-namespace/ns2_osdp_services.yaml"
243243
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
244244
name: edpm-nodeset2
245-
path: examples/va/multi-namespace/edpm2/nodeset
245+
path: examples/va/multi-namespace-skmo/edpm2/nodeset
246246
wait_conditions:
247247
- >-
248248
oc -n openstack wait
@@ -257,7 +257,12 @@ vas:
257257
src_file: values.yaml
258258
build_output: nodeset2.yaml
259259

260-
- name: edpm-deployment # stage 9
260+
- pre_stage_run: # stage 9
261+
- name: Recreate EDPM deployments when NodeSet config hash drifted
262+
type: playbook
263+
source: "skmo/recreate-edpm-deployment-if-stale.yaml"
264+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
265+
name: edpm-deployment
261266
path: examples/va/multi-namespace/edpm
262267
wait_conditions:
263268
# We don't wait for this namespace's OpenStackDataPlaneDeployment at
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
# SKMO uses linux-bridge ospbr for ctlplane (NNCP). MetalLB must announce VIPs on
3+
# the bridge, not the raw NIC (enp7s0), or EDPM nodes cannot reach dnsmasq UDP/53.
4+
apiVersion: kustomize.config.k8s.io/v1alpha1
5+
kind: Component
6+
7+
patches:
8+
- target:
9+
group: metallb.io
10+
kind: L2Advertisement
11+
name: ctlplane
12+
patch: |-
13+
- op: replace
14+
path: /spec/interfaces/0
15+
value: ospbr
16+
- target:
17+
group: metallb.io
18+
kind: L2Advertisement
19+
name: ctlplane2
20+
patch: |-
21+
- op: replace
22+
path: /spec/interfaces/0
23+
value: ospbr2
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
---
2+
# Octavia NNCP patches for SKMO. Select by osp/nncp-node label so patches apply
3+
# after lib/nncp-single-nic renames node-0 -> ostest-master-0.
4+
apiVersion: kustomize.config.k8s.io/v1alpha1
5+
kind: Component
6+
7+
components:
8+
- ../octavia-network-values
9+
10+
patches:
11+
- target:
12+
kind: NodeNetworkConfigurationPolicy
13+
labelSelector: osp/nncp-node=node-0
14+
patch: |-
15+
- op: add
16+
path: /spec/desiredState/interfaces/-
17+
value:
18+
description: Octavia vlan host interface
19+
name: octavia
20+
state: up
21+
type: vlan
22+
vlan:
23+
base-iface: _replaced_
24+
id: _replaced_
25+
- target:
26+
kind: NodeNetworkConfigurationPolicy
27+
labelSelector: osp/nncp-node=node-0
28+
patch: |-
29+
- op: add
30+
path: /spec/desiredState/interfaces/-
31+
value:
32+
description: Octavia bridge
33+
mtu: 1500
34+
name: octbr
35+
type: linux-bridge
36+
bridge:
37+
options:
38+
stp:
39+
enabled: false
40+
port:
41+
- name: octavia
42+
- target:
43+
kind: NodeNetworkConfigurationPolicy
44+
labelSelector: osp/nncp-node=node-1
45+
patch: |-
46+
- op: add
47+
path: /spec/desiredState/interfaces/-
48+
value:
49+
description: Octavia vlan host interface
50+
name: octavia
51+
state: up
52+
type: vlan
53+
vlan:
54+
base-iface: _replaced_
55+
id: _replaced_
56+
- target:
57+
kind: NodeNetworkConfigurationPolicy
58+
labelSelector: osp/nncp-node=node-1
59+
patch: |-
60+
- op: add
61+
path: /spec/desiredState/interfaces/-
62+
value:
63+
description: Octavia bridge
64+
mtu: 1500
65+
name: octbr
66+
type: linux-bridge
67+
bridge:
68+
options:
69+
stp:
70+
enabled: false
71+
port:
72+
- name: octavia
73+
- target:
74+
kind: NodeNetworkConfigurationPolicy
75+
labelSelector: osp/nncp-node=node-2
76+
patch: |-
77+
- op: add
78+
path: /spec/desiredState/interfaces/-
79+
value:
80+
description: Octavia vlan host interface
81+
name: octavia
82+
state: up
83+
type: vlan
84+
vlan:
85+
base-iface: _replaced_
86+
id: _replaced_
87+
- target:
88+
kind: NodeNetworkConfigurationPolicy
89+
labelSelector: osp/nncp-node=node-2
90+
patch: |-
91+
- op: add
92+
path: /spec/desiredState/interfaces/-
93+
value:
94+
description: Octavia bridge
95+
mtu: 1500
96+
name: octbr
97+
type: linux-bridge
98+
bridge:
99+
options:
100+
stp:
101+
enabled: false
102+
port:
103+
- name: octavia
104+
105+
replacements:
106+
- source:
107+
kind: ConfigMap
108+
name: network-values
109+
fieldPath: data.octavia.base_iface
110+
targets:
111+
- select:
112+
kind: NodeNetworkConfigurationPolicy
113+
labelSelector: osp/nncp-node=node-0
114+
fieldPaths:
115+
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
116+
- source:
117+
kind: ConfigMap
118+
name: network-values
119+
fieldPath: data.octavia.vlan
120+
targets:
121+
- select:
122+
kind: NodeNetworkConfigurationPolicy
123+
labelSelector: osp/nncp-node=node-0
124+
fieldPaths:
125+
- spec.desiredState.interfaces.[name=octavia].vlan.id
126+
- source:
127+
kind: ConfigMap
128+
name: network-values
129+
fieldPath: data.octavia.base_iface
130+
targets:
131+
- select:
132+
kind: NodeNetworkConfigurationPolicy
133+
labelSelector: osp/nncp-node=node-1
134+
fieldPaths:
135+
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
136+
- source:
137+
kind: ConfigMap
138+
name: network-values
139+
fieldPath: data.octavia.vlan
140+
targets:
141+
- select:
142+
kind: NodeNetworkConfigurationPolicy
143+
labelSelector: osp/nncp-node=node-1
144+
fieldPaths:
145+
- spec.desiredState.interfaces.[name=octavia].vlan.id
146+
- source:
147+
kind: ConfigMap
148+
name: network-values
149+
fieldPath: data.octavia.base_iface
150+
targets:
151+
- select:
152+
kind: NodeNetworkConfigurationPolicy
153+
labelSelector: osp/nncp-node=node-2
154+
fieldPaths:
155+
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
156+
- source:
157+
kind: ConfigMap
158+
name: network-values
159+
fieldPath: data.octavia.vlan
160+
targets:
161+
- select:
162+
kind: NodeNetworkConfigurationPolicy
163+
labelSelector: osp/nncp-node=node-2
164+
fieldPaths:
165+
- spec.desiredState.interfaces.[name=octavia].vlan.id
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: edpm-nodeset-values
6+
data:
7+
nodeset:
8+
ansible:
9+
ansibleVars:
10+
edpm_ovn_bridge_mappings:
11+
- "datacentre:br-ex"
12+
- "octavia:octbr"
13+
edpm_network_config_template: |
14+
---
15+
{% set mtu_list = [ctlplane_mtu] %}
16+
{% for network in nodeset_networks %}
17+
{% set _ = mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) %}
18+
{%- endfor %}
19+
{% set min_viable_mtu = mtu_list | max %}
20+
network_config:
21+
- type: interface
22+
name: nic1
23+
use_dhcp: true
24+
mtu: {{ min_viable_mtu }}
25+
- type: ovs_bridge
26+
name: {{ neutron_physical_bridge_name }}
27+
mtu: {{ min_viable_mtu }}
28+
use_dhcp: false
29+
dns_servers: {{ ctlplane_dns_nameservers }}
30+
domain: {{ dns_search_domains }}
31+
addresses:
32+
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }}
33+
routes: {{ ctlplane_host_routes }}
34+
members:
35+
- type: interface
36+
name: nic2
37+
mtu: {{ min_viable_mtu }}
38+
# force the MAC address of the bridge to this interface
39+
primary: true
40+
{% for network in nodeset_networks %}
41+
- type: vlan
42+
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
43+
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
44+
addresses:
45+
- ip_netmask:
46+
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
47+
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
48+
{% endfor %}
49+
- type: ovs_bridge
50+
name: octbr
51+
mtu: {{ min_viable_mtu }}
52+
use_dhcp: false
53+
members:
54+
- type: vlan
55+
mtu: {{ min_viable_mtu }}
56+
vlan_id: 23
57+
device: nic2
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# OVN Octavia compute bridge overlay for EDPM nodesets.
3+
apiVersion: kustomize.config.k8s.io/v1alpha1
4+
kind: Component
5+
6+
patches:
7+
- target:
8+
kind: ConfigMap
9+
name: edpm-nodeset-values
10+
path: edpm-octavia-ansible-vars.yaml
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
# Merge octavia keys into network-values. Kept in components/ so all references
3+
# stay within kustomize load-restrictor roots (plain oc kustomize in CI).
4+
apiVersion: kustomize.config.k8s.io/v1alpha1
5+
kind: Component
6+
7+
patches:
8+
- target:
9+
kind: ConfigMap
10+
name: network-values
11+
path: octavia-network-values.yaml
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# local-config: octavia keys for network-values (static oc kustomize; ci-gen also adds octavia at deploy)
2+
---
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: network-values
7+
annotations:
8+
config.kubernetes.io/local-config: "true"
9+
data:
10+
octavia:
11+
dnsDomain: octavia.example.com
12+
mtu: 1500
13+
vlan: 23
14+
base_iface: enp7s0
15+
net-attach-def: |
16+
{
17+
"cniVersion": "0.3.1",
18+
"name": "octavia",
19+
"type": "bridge",
20+
"bridge": "octbr",
21+
"ipam": {
22+
"type": "whereabouts",
23+
"range": "172.23.0.0/24",
24+
"range_start": "172.23.0.30",
25+
"range_end": "172.23.0.70",
26+
"routes": [
27+
{
28+
"dst": "172.24.0.0/16",
29+
"gw": "172.23.0.150"
30+
}
31+
]
32+
}
33+
}

0 commit comments

Comments
 (0)