Skip to content

Commit 9770545

Browse files
committed
nova05: ext net for tests accessing VMs via FIP
Remove the datacentre NAD so the ovn-operator creates it with proper ownerReference and attaches the OVS pod to it. Add external NAD definition with VLAN to DT nncp/values.yaml. Add customServiceConfig to disable distributed FIPs in DT cp yaml. Update DT README with external network / centralized FIP notes. Update scenario-vars.yaml with external NAD for Tempest access to FIP. Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
1 parent c415e55 commit 9770545

5 files changed

Lines changed: 166 additions & 97 deletions

File tree

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: external
6+
labels:
7+
osp/net: external
8+
osp/net-attach-def-type: standard

dt/nova/nova05epsilon/networking/kustomization.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,22 @@ components:
2525
resources:
2626
- storagemgmt-nad.yaml
2727
- storagemgmt-metallb.yaml
28+
- external-nad.yaml
2829

29-
# Add storagemgmt network template, as it is needed for CephHCI
30+
# Remove the datacentre NAD so the ovn-operator creates it with
31+
# proper ownerReference and attaches the OVS pod to it.
3032
patches:
33+
- target:
34+
kind: NetworkAttachmentDefinition
35+
name: datacentre
36+
patch: |
37+
$patch: delete
38+
apiVersion: k8s.cni.cncf.io/v1
39+
kind: NetworkAttachmentDefinition
40+
metadata:
41+
name: datacentre
42+
43+
# Add storagemgmt network template, as it is needed for CephHCI
3144
- target:
3245
version: v1beta1
3346
kind: NetConfig
@@ -122,3 +135,15 @@ replacements:
122135
name: ctlplane
123136
fieldPaths:
124137
- spec.interfaces.0
138+
139+
# External NAD for provider network FIP access
140+
- source:
141+
kind: ConfigMap
142+
name: network-values
143+
fieldPath: data.external.net-attach-def
144+
targets:
145+
- select:
146+
kind: NetworkAttachmentDefinition
147+
name: external
148+
fieldPaths:
149+
- spec.config

dt/nova/nova05epsilon/networking/nncp/kustomization.yaml

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -47,86 +47,86 @@ patches:
4747
patch: |-
4848
- op: remove
4949
path: /spec/nodeSelector/node-role.kubernetes.io~1worker
50-
# Optional: add storagemgmt VLAN interface to the SNO node.
51-
# Uncomment this patch AND node_0.storagemgmt_ip in values.yaml.
52-
# Not required for CephHCI (Ceph uses storage network for OSD traffic).
53-
# - target:
54-
# kind: NodeNetworkConfigurationPolicy
55-
# name: node-0
56-
# patch: |-
57-
# - op: add
58-
# path: /spec/desiredState/interfaces/-
59-
# value:
60-
# description: storagemgmt vlan host interface
61-
# name: storagemgmt
62-
# state: up
63-
# type: vlan
64-
# mtu: _replaced_
65-
# ipv4:
66-
# address:
67-
# - ip: _replaced_
68-
# prefix-length: _replaced_
69-
# dhcp: false
70-
# enabled: true
71-
# ipv6:
72-
# enabled: false
73-
# vlan:
74-
# base-iface: _replaced_
75-
# id: _replaced_
7650
77-
# Uncomment these replacements together with the storagemgmt patch above
78-
# replacements:
79-
# - source:
80-
# kind: ConfigMap
81-
# name: network-values
82-
# fieldPath: data.node_0.storagemgmt_ip
83-
# targets:
84-
# - select:
85-
# kind: NodeNetworkConfigurationPolicy
86-
# name: node-0
87-
# fieldPaths:
88-
# - spec.desiredState.interfaces.[name=storagemgmt].ipv4.address.0.ip
89-
# - source:
90-
# kind: ConfigMap
91-
# name: network-values
92-
# fieldPath: data.storagemgmt.base_iface
93-
# targets:
94-
# - select:
95-
# kind: NodeNetworkConfigurationPolicy
96-
# fieldPaths:
97-
# - spec.desiredState.interfaces.[name=storagemgmt].vlan.base-iface
98-
# options:
99-
# create: true
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-
# - source:
123-
# kind: ConfigMap
124-
# name: network-values
125-
# fieldPath: data.storagemgmt.prefix-length
126-
# targets:
127-
# - select:
128-
# kind: NodeNetworkConfigurationPolicy
129-
# fieldPaths:
130-
# - spec.desiredState.interfaces.[name=storagemgmt].ipv4.address.0.prefix-length
131-
# options:
132-
# create: true
51+
# Add external VLAN interface on ospbr for OVN provider network access.
52+
# Required for centralized floating IPs in DCN scenarios where the
53+
# external VLAN is carried over the datacentre bridge.
54+
- target:
55+
kind: NodeNetworkConfigurationPolicy
56+
name: node-0
57+
patch: |-
58+
- op: add
59+
path: /spec/desiredState/interfaces/-
60+
value:
61+
description: external vlan interface on ospbr
62+
name: external
63+
state: up
64+
type: vlan
65+
mtu: _replaced_
66+
ipv4:
67+
address:
68+
- ip: _replaced_
69+
prefix-length: _replaced_
70+
dhcp: false
71+
enabled: true
72+
ipv6:
73+
enabled: false
74+
vlan:
75+
base-iface: _replaced_
76+
id: _replaced_
77+
78+
replacements:
79+
- source:
80+
kind: ConfigMap
81+
name: network-values
82+
fieldPath: data.node_0.external_ip
83+
targets:
84+
- select:
85+
kind: NodeNetworkConfigurationPolicy
86+
name: node-0
87+
fieldPaths:
88+
- spec.desiredState.interfaces.[name=external].ipv4.address.0.ip
89+
- source:
90+
kind: ConfigMap
91+
name: network-values
92+
fieldPath: data.external.base_iface
93+
targets:
94+
- select:
95+
kind: NodeNetworkConfigurationPolicy
96+
fieldPaths:
97+
- spec.desiredState.interfaces.[name=external].vlan.base-iface
98+
options:
99+
create: true
100+
- source:
101+
kind: ConfigMap
102+
name: network-values
103+
fieldPath: data.external.vlan
104+
targets:
105+
- select:
106+
kind: NodeNetworkConfigurationPolicy
107+
fieldPaths:
108+
- spec.desiredState.interfaces.[name=external].vlan.id
109+
options:
110+
create: true
111+
- source:
112+
kind: ConfigMap
113+
name: network-values
114+
fieldPath: data.external.mtu
115+
targets:
116+
- select:
117+
kind: NodeNetworkConfigurationPolicy
118+
fieldPaths:
119+
- spec.desiredState.interfaces.[name=external].mtu
120+
options:
121+
create: true
122+
- source:
123+
kind: ConfigMap
124+
name: network-values
125+
fieldPath: data.external.prefix-length
126+
targets:
127+
- select:
128+
kind: NodeNetworkConfigurationPolicy
129+
fieldPaths:
130+
- spec.desiredState.interfaces.[name=external].ipv4.address.0.prefix-length
131+
options:
132+
create: true

examples/dt/nova/nova05epsilon/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,24 @@ The dataplane stages (pre-ceph nodeset, pre-ceph deployment, Ceph
120120
install, post-ceph nodeset, post-ceph deployment) must be repeated
121121
for each DCN site with site-specific values. Each site's computes
122122
should reference the appropriate cell, subnet, and AZ.
123+
124+
## External Network and Floating IPs
125+
126+
Kustomize removes the datacentre NAD (which lib/nncp component
127+
creates by default) to make it managed with OVN operator instead.
128+
In unmanaged mode, the OVN controller pod is not attached to the
129+
`datacentre` NAD making the bridge mapping non-functional.
130+
131+
### CHANGEME values for the external network
132+
133+
In `control-plane/networking/nncp/values.yaml`, fill in:
134+
- `CHANGEME_SNO_EXTERNAL_*`: IP range, CIDR, gateway, VLAN for
135+
the control-plane site's external subnet.
136+
- `CHANGEME_EDPM_EXTERNAL_*`: The same for the compute site
137+
(each site needs its own external VLAN).
138+
- `CHANGEME_SNO_EXTERNAL_IP`: IP address assigned to the `external`
139+
VLAN interface on the OCP node (must not overlap with NAD IPAM
140+
or OpenStack FIP allocation pools).
141+
- `CHANGEME_SNO_EXTERNAL_NAD_START/END`: IPAM range for pods
142+
attached via the `external` NAD (must not overlap with OpenStack
143+
FIP allocation pools).

examples/dt/nova/nova05epsilon/control-plane/networking/nncp/values.yaml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,13 @@ data:
7272
routes:
7373
- destination: CHANGEME_SNO_CTLPLANE_CIDR
7474
nexthop: CHANGEME_EDPM_CTLPLANE_GW
75+
# The datacentre NAD is deleted by the networking kustomization
76+
# for the ovn-operator to create it with proper
77+
# ownerReference. A placeholder is still required because
78+
# lib/networking/nad uses it as a kustomize replacement source.
7579
datacentre:
7680
net-attach-def: |
77-
{
78-
"cniVersion": "0.4.0",
79-
"name": "datacentre",
80-
"plugins": [{
81-
"type": "host-device",
82-
"device": "CHANGEME_SNO_IFACE",
83-
"ipam": {}
84-
}, {
85-
"type": "tuning",
86-
"sysctl": {
87-
"net.ipv6.conf.IFNAME.accept_ra": "0"
88-
}
89-
}]
90-
}
81+
{}
9182
dns-resolver:
9283
config:
9384
search: []
@@ -98,8 +89,31 @@ data:
9889
values:
9990
- CHANGEME_SNO_DNS_SERVER
10091
external:
92+
base_iface: ospbr
10193
dnsDomain: external.example.com
94+
iface: external
10295
mtu: 1500
96+
net-attach-def: |
97+
{
98+
"cniVersion": "0.4.0",
99+
"name": "external",
100+
"plugins": [{
101+
"type": "macvlan",
102+
"master": "external",
103+
"mode": "bridge",
104+
"ipam": {
105+
"type": "whereabouts",
106+
"range": "CHANGEME_SNO_EXTERNAL_CIDR",
107+
"range_start": "CHANGEME_SNO_EXTERNAL_NAD_START",
108+
"range_end": "CHANGEME_SNO_EXTERNAL_NAD_END"
109+
}
110+
}, {
111+
"type": "tuning",
112+
"sysctl": {
113+
"net.ipv6.conf.IFNAME.accept_ra": "0"
114+
}
115+
}]
116+
}
103117
prefix-length: 24
104118
subnets:
105119
- allocationRanges:
@@ -180,6 +194,7 @@ data:
180194
# SNO: single OCP node only
181195
node_0:
182196
ctlplane_ip: CHANGEME_SNO_CTLPLANE_IP
197+
external_ip: CHANGEME_SNO_EXTERNAL_IP
183198
internalapi_ip: CHANGEME_SNO_INTAPI_IP
184199
name: CHANGEME_SNO_NODE_NAME
185200
storage_ip: CHANGEME_SNO_STORAGE_IP

0 commit comments

Comments
 (0)