Skip to content

Commit 6d5e013

Browse files
fultonjolliewalshclaude
committed
Add storagemgmt network and adoption-specific networking for DCN
Configure networking resources for DCN adoption workflow: NNCP changes: - Add storagemgmt VLAN interface on master nodes (base_iface: enp7s0) - Add storagemgmt_ip to each node (for Swift, not needed for Ceph) - Add kustomize replacements for storagemgmt base_iface, vlan, mtu, prefix-length Networking changes: - Add storagemgmt NAD, IPAddressPool, and L2Advertisement - Override ctlplane L2Advertisement to use bridgeName (ospbr) for adoption - Change datacentre NAD from bridge to host-device on enp8s0 - Update external network to VLAN 44 Values updates: - Add storagemgmt net-attach-def and lb_addresses - Fix typo in ctlplane subnet2 nexthop Applies the same pattern from commit 1719890 "Add storagemgmt NAD to uni05epsilon DT". Having the storagemgmt network on OCP nodes is needed when using DCN with Swift but is not necessary when using Ceph. The example added by this patch will be used by the following adoption scenario. openstack-k8s-operators/data-plane-adoption#1184 Co-Authored-by: Oliver Walsh <owalsh@redhat.com> Co-Authored-by: Claude <noreply@anthropic.com> Signed-off-by: John Fulton <fulton@redhat.com>
1 parent e6cc6c1 commit 6d5e013

File tree

5 files changed

+215
-6
lines changed

5 files changed

+215
-6
lines changed

dt/dcn/networking/kustomization.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ components:
2424

2525
resources:
2626
- nad.yaml
27+
- storagemgmt-nad.yaml
28+
- storagemgmt-metallb.yaml
2729

2830
# Add storagemgmt network template, as it is needed for CephHCI
2931
patches:
@@ -85,3 +87,51 @@ replacements:
8587
name: octavia
8688
fieldPaths:
8789
- spec.config
90+
91+
# Storagemgmt NAD support
92+
- source:
93+
kind: ConfigMap
94+
name: network-values
95+
fieldPath: data.storagemgmt.net-attach-def
96+
targets:
97+
- select:
98+
kind: NetworkAttachmentDefinition
99+
name: storagemgmt
100+
fieldPaths:
101+
- spec.config
102+
103+
# Storagemgmt IPAddressPool
104+
- source:
105+
kind: ConfigMap
106+
name: network-values
107+
fieldPath: data.storagemgmt.lb_addresses
108+
targets:
109+
- select:
110+
kind: IPAddressPool
111+
name: storagemgmt
112+
fieldPaths:
113+
- spec.addresses
114+
115+
# Storagemgmt L2Advertisement interface
116+
- source:
117+
kind: ConfigMap
118+
name: network-values
119+
fieldPath: data.storagemgmt.iface
120+
targets:
121+
- select:
122+
kind: L2Advertisement
123+
name: storagemgmt
124+
fieldPaths:
125+
- spec.interfaces.0
126+
127+
# Override ctlplane L2Advertisement to use bridgeName (ospbr) instead of ctlplane.iface (enp7s0)
128+
- source:
129+
kind: ConfigMap
130+
name: network-values
131+
fieldPath: data.bridgeName
132+
targets:
133+
- select:
134+
kind: L2Advertisement
135+
name: ctlplane
136+
fieldPaths:
137+
- spec.interfaces.0
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
apiVersion: metallb.io/v1beta1
3+
kind: IPAddressPool
4+
metadata:
5+
name: storagemgmt
6+
namespace: metallb-system
7+
labels:
8+
osp/lb-addresses-type: standard
9+
spec:
10+
addresses:
11+
- _replaced_
12+
---
13+
apiVersion: metallb.io/v1beta1
14+
kind: L2Advertisement
15+
metadata:
16+
name: storagemgmt
17+
namespace: metallb-system
18+
spec:
19+
ipAddressPools:
20+
- storagemgmt
21+
interfaces:
22+
- _replaced_
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: k8s.cni.cncf.io/v1
3+
kind: NetworkAttachmentDefinition
4+
metadata:
5+
name: storagemgmt
6+
labels:
7+
osp/net: storagemgmt
8+
osp/net-attach-def-type: standard

examples/dt/dcn/control-plane/networking/nncp/kustomization.yaml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,113 @@ components:
2323

2424
resources:
2525
- values.yaml
26+
27+
# storagemgmt_ip below should only be used for Swift here (not necessary for Ceph)
28+
29+
patches:
30+
- target:
31+
kind: NodeNetworkConfigurationPolicy
32+
name: "master-.*"
33+
patch: |-
34+
- op: add
35+
path: /spec/desiredState/interfaces/-
36+
value:
37+
description: storagemgmt vlan host interface
38+
name: storagemgmt
39+
state: up
40+
type: vlan
41+
mtu: _mtu_replaced_
42+
ipv4:
43+
address:
44+
- ip: _ip_replaced_
45+
prefix-length: _prefix_replaced_
46+
dhcp: false
47+
enabled: true
48+
ipv6:
49+
enabled: false
50+
vlan:
51+
base-iface: _base_iface_replaced_
52+
id: _vlan_id_replaced_
53+
54+
replacements:
55+
- source:
56+
kind: ConfigMap
57+
name: network-values
58+
fieldPath: data.node_0.storagemgmt_ip
59+
targets:
60+
- select:
61+
kind: NodeNetworkConfigurationPolicy
62+
name: master-0
63+
fieldPaths:
64+
- spec.desiredState.interfaces.[name=storagemgmt].ipv4.address.0.ip
65+
66+
- source:
67+
kind: ConfigMap
68+
name: network-values
69+
fieldPath: data.node_1.storagemgmt_ip
70+
targets:
71+
- select:
72+
kind: NodeNetworkConfigurationPolicy
73+
name: master-1
74+
fieldPaths:
75+
- spec.desiredState.interfaces.[name=storagemgmt].ipv4.address.0.ip
76+
77+
- source:
78+
kind: ConfigMap
79+
name: network-values
80+
fieldPath: data.node_2.storagemgmt_ip
81+
targets:
82+
- select:
83+
kind: NodeNetworkConfigurationPolicy
84+
name: master-2
85+
fieldPaths:
86+
- spec.desiredState.interfaces.[name=storagemgmt].ipv4.address.0.ip
87+
88+
- source:
89+
kind: ConfigMap
90+
name: network-values
91+
fieldPath: data.storagemgmt.base_iface
92+
targets:
93+
- select:
94+
kind: NodeNetworkConfigurationPolicy
95+
fieldPaths:
96+
- spec.desiredState.interfaces.[name=storagemgmt].vlan.base-iface
97+
options:
98+
create: true
99+
100+
- source:
101+
kind: ConfigMap
102+
name: network-values
103+
fieldPath: data.storagemgmt.vlan
104+
targets:
105+
- select:
106+
kind: NodeNetworkConfigurationPolicy
107+
fieldPaths:
108+
- spec.desiredState.interfaces.[name=storagemgmt].vlan.id
109+
options:
110+
create: true
111+
- source:
112+
kind: ConfigMap
113+
name: network-values
114+
fieldPath: data.storagemgmt.mtu
115+
targets:
116+
- select:
117+
kind: NodeNetworkConfigurationPolicy
118+
fieldPaths:
119+
- spec.desiredState.interfaces.[name=storagemgmt].mtu
120+
options:
121+
create: true
122+
123+
- source:
124+
kind: ConfigMap
125+
name: network-values
126+
fieldPath: data.storagemgmt.prefix-length
127+
targets:
128+
- select:
129+
kind: NodeNetworkConfigurationPolicy
130+
fieldPaths:
131+
- spec.desiredState.interfaces.[name=storagemgmt].ipv4.address.0.prefix-length
132+
options:
133+
create: true
134+
135+
# storagemgmt_ip above should only be used for Swift here (not necessary for Ceph)

examples/dt/dcn/control-plane/networking/nncp/values.yaml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data:
6262
- destination: 192.168.122.0/24
6363
nexthop: 192.168.133.1
6464
- destination: 192.168.144.0/24
65-
nexthop: 192.168.133.1ØØ
65+
nexthop: 192.168.133.1
6666
- allocationRanges:
6767
- end: 192.168.144.120
6868
start: 192.168.144.100
@@ -147,8 +147,8 @@ data:
147147
{
148148
"cniVersion": "0.3.1",
149149
"name": "datacentre",
150-
"type": "bridge",
151-
"bridge": "ospbr",
150+
"type": "host-device",
151+
"device": "enp8s0",
152152
"ipam": {}
153153
}
154154
dns-resolver:
@@ -170,8 +170,8 @@ data:
170170
start: 10.0.0.100
171171
cidr: 10.0.0.0/24
172172
name: subnet1
173-
vlan: 22
174-
vlan: 22
173+
vlan: 44
174+
vlan: 44
175175
internalapi:
176176
base_iface: enp7s0
177177
dnsDomain: internalapi.example.com
@@ -309,23 +309,27 @@ data:
309309
vlan: 40
310310
vlan: 40
311311
lbServiceType: LoadBalancer
312+
# storagemgmt_ip should only be used for Swift here (not necessary for Ceph)
312313
node_0:
313314
ctlplane_ip: 192.168.122.10
314315
internalapi_ip: 172.17.0.10
315316
name: master-0
316317
storage_ip: 172.18.0.10
318+
storagemgmt_ip: 172.20.0.10
317319
tenant_ip: 172.19.0.10
318320
node_1:
319321
ctlplane_ip: 192.168.122.11
320322
internalapi_ip: 172.17.0.11
321323
name: master-1
322324
storage_ip: 172.18.0.11
325+
storagemgmt_ip: 172.20.0.11
323326
tenant_ip: 172.19.0.11
324327
node_2:
325328
ctlplane_ip: 192.168.122.12
326329
internalapi_ip: 172.17.0.12
327330
name: master-2
328331
storage_ip: 172.18.0.12
332+
storagemgmt_ip: 172.20.0.12
329333
tenant_ip: 172.19.0.12
330334
rabbitmq:
331335
endpoint_annotations:
@@ -507,10 +511,25 @@ data:
507511
vlan: 41
508512
vlan: 41
509513
storagemgmt:
510-
base_iface: eth1
514+
base_iface: enp7s0
511515
dnsDomain: storagemgmt.example.com
512516
iface: storagemgmt
517+
lb_addresses:
518+
- 172.20.0.80-172.20.0.90
513519
mtu: 1500
520+
net-attach-def: |
521+
{
522+
"cniVersion": "0.3.1",
523+
"name": "storagemgmt",
524+
"type": "macvlan",
525+
"master": "storagemgmt",
526+
"ipam": {
527+
"type": "whereabouts",
528+
"range": "172.20.0.0/24",
529+
"range_start": "172.20.0.30",
530+
"range_end": "172.20.0.70"
531+
}
532+
}
514533
prefix-length: 24
515534
subnets:
516535
- allocationRanges:

0 commit comments

Comments
 (0)