Skip to content

Commit 69a4aed

Browse files
Merge pull request openstack-k8s-operators#404 from fultonj/net2
Add Swift network for RGW to HCI scenario When Ceph RGW is used, an endpoint for Swift storage is hosted not in a pod on k8s but on an EDPM node. Thus, a service hosted on an EDPM node will need to be accessed by cloud users from a separate network. This patch adds the Swift storage network (swift) with VLAN 25 and range 172.22.0.0/24 in the HCI values example. The Swift network is configured on the HCI EDPM nodes and an NNCP, NAD, L2Advertisement and IPAddressPool are defined so that a pod in k8s can connect to it; such as the tempest pod which will perform object storage tests. Jira: https://issues.redhat.com/browse/OSPRH-6675 Reviewed-by: Andrew Bays <[email protected]> Reviewed-by: John Fulton <[email protected]> Reviewed-by: Francesco Pantano <[email protected]>
2 parents 21ece11 + eaaf62b commit 69a4aed

File tree

14 files changed

+300
-1
lines changed

14 files changed

+300
-1
lines changed

examples/va/hci/control-plane/nncp/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ transformers:
1818
create: true
1919
2020
components:
21-
- ../../../../../lib/nncp
21+
- ../../../../../va/hci/nncp
2222

2323
resources:
2424
- values.yaml

examples/va/hci/control-plane/nncp/values.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@ data:
1414
tenant_ip: 172.19.0.5
1515
ctlplane_ip: 192.168.122.10
1616
storage_ip: 172.18.0.5
17+
swift_ip: 172.22.0.5
1718
node_1:
1819
name: ostest-master-1
1920
internalapi_ip: 172.17.0.6
2021
tenant_ip: 172.19.0.6
2122
ctlplane_ip: 192.168.122.11
2223
storage_ip: 172.18.0.6
24+
swift_ip: 172.22.0.6
2325
node_2:
2426
name: ostest-master-2
2527
internalapi_ip: 172.17.0.7
2628
tenant_ip: 172.19.0.7
2729
ctlplane_ip: 192.168.122.12
2830
storage_ip: 172.18.0.7
31+
swift_ip: 172.22.0.7
2932

3033
# networks
3134
ctlplane:
@@ -172,6 +175,36 @@ data:
172175
gateway: 10.0.0.1
173176
name: subnet1
174177
mtu: 1500
178+
swift:
179+
dnsDomain: swift.example.com
180+
subnets:
181+
- allocationRanges:
182+
- end: 172.22.0.250
183+
start: 172.22.0.100
184+
cidr: 172.22.0.0/24
185+
gateway: 172.22.0.1
186+
name: subnet1
187+
vlan: 25
188+
mtu: 1500
189+
prefix-length: 24
190+
iface: swift
191+
vlan: 25
192+
base_iface: enp6s0
193+
lb_addresses:
194+
- 172.22.0.80-172.22.0.90
195+
net-attach-def: |
196+
{
197+
"cniVersion": "0.3.1",
198+
"name": "swift",
199+
"type": "macvlan",
200+
"master": "swift",
201+
"ipam": {
202+
"type": "whereabouts",
203+
"range": "172.22.0.0/24",
204+
"range_start": "172.22.0.100",
205+
"range_end": "172.22.0.250"
206+
}
207+
}
175208
datacentre:
176209
net-attach-def: |
177210
{

lib/nncp/ocp_nodes_nncp.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@ metadata:
55
name: node-0
66
labels:
77
osp/nncm-config-type: standard
8+
osp/nncm-node: "0"
89
---
910
apiVersion: nmstate.io/v1
1011
kind: NodeNetworkConfigurationPolicy
1112
metadata:
1213
name: node-1
1314
labels:
1415
osp/nncm-config-type: standard
16+
osp/nncm-node: "1"
1517
---
1618
apiVersion: nmstate.io/v1
1719
kind: NodeNetworkConfigurationPolicy
1820
metadata:
1921
name: node-2
2022
labels:
2123
osp/nncm-config-type: standard
24+
osp/nncm-node: "2"

va/hci/edpm-post-ceph/nodeset/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ transformers:
2020
components:
2121
- ../../../../lib/control-plane
2222
- ../../../../lib/dataplane/nodeset
23+
- ../../../../va/hci/nodeset
2324

2425
resources:
2526
- ceph_secret.yaml

va/hci/edpm-pre-ceph/nodeset/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ transformers:
1919
2020
components:
2121
- ../../../../lib/dataplane/nodeset
22+
- ../../../../va/hci/nodeset

va/hci/kustomization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ transformers:
1919
2020
components:
2121
- ../../lib/networking/metallb
22+
- networking/metallb
2223
- ../../lib/networking/netconfig
24+
- networking/netconfig
2325
- ../../lib/networking/nad
26+
- networking/nad
2427
- ../../lib/control-plane
2528

2629
# Add storagemgmt network template, as it is needed for CephHCI
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
4+
5+
resources:
6+
- metallb_l2advertisement.yaml
7+
- ocp_ip_pools.yaml
8+
9+
replacements:
10+
- source:
11+
kind: ConfigMap
12+
name: network-values
13+
fieldPath: data.swift.lb_addresses
14+
targets:
15+
- select:
16+
group: metallb.io
17+
kind: IPAddressPool
18+
name: swift
19+
fieldPaths:
20+
- spec.addresses
21+
options:
22+
create: true
23+
24+
- source:
25+
kind: ConfigMap
26+
name: network-values
27+
fieldPath: data.swift.iface
28+
targets:
29+
- select:
30+
group: metallb.io
31+
kind: L2Advertisement
32+
name: swift
33+
fieldPaths:
34+
- spec.interfaces.0
35+
options:
36+
create: true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
apiVersion: metallb.io/v1beta1
3+
kind: L2Advertisement
4+
metadata:
5+
name: swift
6+
namespace: metallb-system
7+
spec:
8+
ipAddressPools:
9+
- swift
10+
interfaces:
11+
- _replaced_
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: metallb.io/v1beta1
3+
kind: IPAddressPool
4+
metadata:
5+
namespace: metallb-system
6+
name: swift
7+
labels:
8+
osp/lb-addresses-type: standard
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
4+
5+
transformers:
6+
# Set namespace to OpenStack on all namespaced objects without a namespace
7+
- |-
8+
apiVersion: builtin
9+
kind: NamespaceTransformer
10+
metadata:
11+
name: _ignored_
12+
namespace: openstack
13+
setRoleBindingSubjects: none
14+
unsetOnly: true
15+
fieldSpecs:
16+
- path: metadata/name
17+
kind: Namespace
18+
create: true
19+
20+
resources:
21+
- ocp_networks_netattach.yaml
22+
23+
replacements:
24+
- source:
25+
kind: ConfigMap
26+
name: network-values
27+
fieldPath: data.swift.net-attach-def
28+
targets:
29+
- select:
30+
kind: NetworkAttachmentDefinition
31+
name: swift
32+
fieldPaths:
33+
- spec.config
34+
options:
35+
create: true

0 commit comments

Comments
 (0)