Skip to content

Commit

Permalink
Add NFS network for Manila to uni04delta
Browse files Browse the repository at this point in the history
Manila Tempest tests need to connect to the share for
Ganesha via a special (openstack) network [1].

This patch adds the NFS storage network with VLAN 24 and
range 172.21.0.0/24 in uni04delta. The NFS network is
connected to Ceph and Compute EDPM nodes. A NNCP, NAD,
L2Advertisement and IPAddressPool are defined for the
NFS network so that a pod in k8s can connect to it; such
as the tempest pod which will perform the storage tests.

In order to make these changes, uni04delta now keeps its
own copy of the nncp and networking directories since
they differ (by the new network) from the generic ones
in the lib directory.

TODO: update Manila CRDs to use this network.

[1] https://opendev.org/openstack/manila-tempest-plugin/src/branch/master/manila_tempest_tests/config.py#L99

Jira: https://issues.redhat.com/browse/OSPRH-7417
Depends-On: openstack-k8s-operators/ci-framework#2273

Signed-off-by: John Fulton <[email protected]>
  • Loading branch information
fultonj committed Sep 5, 2024
1 parent 4b43496 commit 68539dd
Show file tree
Hide file tree
Showing 18 changed files with 1,345 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dt/uni04delta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ transformers:
create: true
components:
- ../../lib/networking/metallb
- ../../lib/networking/netconfig
- ../../lib/networking/nad
- networking/metallb
- networking/netconfig
- networking/nad
- ../../lib/control-plane

patches:
Expand Down
8 changes: 8 additions & 0 deletions dt/uni04delta/networking/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

components:
- metallb
- nad
- netconfig
181 changes: 181 additions & 0 deletions dt/uni04delta/networking/metallb/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- metallb_l2advertisement.yaml
- ocp_ip_pools.yaml

patches:
- target:
kind: IPAddressPool
labelSelector: "osp/lb-addresses-type=standard"
path: ocp_ip_pool_template.yaml

replacements:
# IPAddressPool addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.lb_addresses
targets:
- select:
kind: IPAddressPool
name: ctlplane
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.lb_addresses
targets:
- select:
kind: IPAddressPool
name: internalapi
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.lb_addresses
targets:
- select:
kind: IPAddressPool
name: storage
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.lb_addresses
targets:
- select:
kind: IPAddressPool
name: tenant
fieldPaths:
- spec.addresses

# Loadbalancer address pools
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: ctlplane
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: internalapi
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: tenant
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: ctlplane
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: storage
fieldPaths:
- spec.addresses
- source:
kind: ConfigMap
name: network-values
fieldPath: data.nfs.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: nfs
fieldPaths:
- spec.addresses

# Loadbalancer interfaces
- source:
kind: ConfigMap
name: network-values
fieldPath: data.bridgeName
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: ctlplane
fieldPaths:
- spec.interfaces.0
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: tenant
fieldPaths:
- spec.interfaces.0
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: storage
fieldPaths:
- spec.interfaces.0
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: internalapi
fieldPaths:
- spec.interfaces.0
- source:
kind: ConfigMap
name: network-values
fieldPath: data.nfs.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: nfs
fieldPaths:
- spec.interfaces.0
59 changes: 59 additions & 0 deletions dt/uni04delta/networking/metallb/metallb_l2advertisement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# Additional advertisements can be added here if needed for other networks
#

---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: ctlplane
namespace: metallb-system
spec:
ipAddressPools:
- ctlplane
interfaces:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: internalapi
namespace: metallb-system
spec:
ipAddressPools:
- internalapi
interfaces:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: storage
namespace: metallb-system
spec:
ipAddressPools:
- storage
interfaces:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: tenant
namespace: metallb-system
spec:
ipAddressPools:
- tenant
interfaces:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: nfs
namespace: metallb-system
spec:
ipAddressPools:
- nfs
interfaces:
- _replaced_
7 changes: 7 additions & 0 deletions dt/uni04delta/networking/metallb/ocp_ip_pool_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: _ignored_
spec:
addresses: []
40 changes: 40 additions & 0 deletions dt/uni04delta/networking/metallb/ocp_ip_pools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
namespace: metallb-system
name: ctlplane
labels:
osp/lb-addresses-type: standard
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
namespace: metallb-system
name: internalapi
labels:
osp/lb-addresses-type: standard
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
namespace: metallb-system
name: storage
labels:
osp/lb-addresses-type: standard
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
namespace: metallb-system
name: tenant
labels:
osp/lb-addresses-type: standard
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
namespace: metallb-system
name: nfs
labels:
osp/lb-addresses-type: standard
75 changes: 75 additions & 0 deletions dt/uni04delta/networking/nad/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- ocp_networks_netattach.yaml

patches:
- target:
kind: NetworkAttachmentDefinition
labelSelector: "osp/net-attach-def-type=standard"
path: ocp_network_template.yaml

replacements:
# NetworkAttachmentDefinition JSON config
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: ctlplane
fieldPaths:
- spec.config
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: internalapi
fieldPaths:
- spec.config
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: storage
fieldPaths:
- spec.config
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: tenant
fieldPaths:
- spec.config
- source:
kind: ConfigMap
name: network-values
fieldPath: data.datacentre.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: datacentre
fieldPaths:
- spec.config
- source:
kind: ConfigMap
name: network-values
fieldPath: data.nfs.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: nfs
fieldPaths:
- spec.config
8 changes: 8 additions & 0 deletions dt/uni04delta/networking/nad/ocp_network_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: nmstate.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: _ignored_
spec:
config: |
_replaced_
Loading

0 comments on commit 68539dd

Please sign in to comment.