Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions automation/net-env/dcn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,19 @@ instances:
skip_nm: false
trunk_parent: ctlplane
vlan_id: 21
storagemgmt:
interface_name: enp7s0.23
ip_v4: 172.20.0.10
is_trunk_parent: false
mac_addr: 52:54:00:05:23:40
mtu: 1500
netmask_v4: 255.255.255.0
network_name: storagemgmt
parent_interface: enp7s0
prefix_length_v4: 24
skip_nm: false
trunk_parent: ctlplane
vlan_id: 23
tenant:
interface_name: enp7s0.22
ip_v4: 172.19.0.10
Expand Down Expand Up @@ -726,6 +739,19 @@ instances:
skip_nm: false
trunk_parent: ctlplane
vlan_id: 21
storagemgmt:
interface_name: enp7s0.23
ip_v4: 172.20.0.11
is_trunk_parent: false
mac_addr: 52:54:00:76:3d:41
mtu: 1500
netmask_v4: 255.255.255.0
network_name: storagemgmt
parent_interface: enp7s0
prefix_length_v4: 24
skip_nm: false
trunk_parent: ctlplane
vlan_id: 23
tenant:
interface_name: enp7s0.22
ip_v4: 172.19.0.11
Expand Down Expand Up @@ -792,6 +818,19 @@ instances:
skip_nm: false
trunk_parent: ctlplane
vlan_id: 21
storagemgmt:
interface_name: enp7s0.23
ip_v4: 172.20.0.12
is_trunk_parent: false
mac_addr: 52:54:00:09:45:42
mtu: 1500
netmask_v4: 255.255.255.0
network_name: storagemgmt
parent_interface: enp7s0
prefix_length_v4: 24
skip_nm: false
trunk_parent: ctlplane
vlan_id: 23
tenant:
interface_name: enp7s0.22
ip_v4: 172.19.0.12
Expand Down
17 changes: 15 additions & 2 deletions automation/vars/dcn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vas:
dcn:
stages:
- name: nncp-configuration
path: examples/dt/dcn/control-plane/nncp
path: examples/dt/dcn/control-plane/networking/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
Expand All @@ -15,6 +15,19 @@ vas:
src_file: values.yaml
build_output: nncp.yaml

- name: networking
path: examples/dt/dcn/control-plane/networking
wait_conditions:
- >-
oc -n metallb-system wait pod
-l app=metallb -l component=speaker
--for condition=Ready
--timeout=5m
values:
- name: network-values
src_file: nncp/values.yaml
build_output: network.yaml

- name: control-plane
path: examples/dt/dcn/control-plane
wait_conditions:
Expand All @@ -23,7 +36,7 @@ vas:
--timeout=30m
values:
- name: network-values
src_file: nncp/values.yaml
src_file: networking/nncp/values.yaml
build_output: ../control-plane.yaml
post_stage_run:
- name: Deploy DCN
Expand Down
67 changes: 0 additions & 67 deletions dt/dcn/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,71 +25,4 @@ transformers:
create: true

components:
- ../../lib/networking/metallb
- ../../lib/networking/netconfig
- ../../lib/networking/nad
- ../../lib/control-plane

resources:
- nad.yaml

# Add storagemgmt network template, as it is needed for CephHCI
patches:
- target:
version: v1beta1
kind: NetConfig
name: netconfig
patch: |-
- op: add
path: /spec/networks/-
value:
dnsDomain: _replaced_
name: storagemgmt
subnets:
- _replaced_
mtu: 1500

# Add storagemgmt network replacements
replacements:
# NetConfig dnsDomain specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].dnsDomain
# NetConfig MTU specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.mtu
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].mtu
# NetConfig subnets specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].subnets

# Octavia support
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: octavia
fieldPaths:
- spec.config
137 changes: 137 additions & 0 deletions dt/dcn/networking/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
# Set namespace to OpenStack on all namespaced objects without a namespace
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true

components:
- ../../../lib/networking/metallb
- ../../../lib/networking/netconfig
- ../../../lib/networking/nad

resources:
- nad.yaml
- storagemgmt-nad.yaml
- storagemgmt-metallb.yaml

# Add storagemgmt network template, as it is needed for CephHCI
patches:
- target:
version: v1beta1
kind: NetConfig
name: netconfig
patch: |-
- op: add
path: /spec/networks/-
value:
dnsDomain: _replaced_
name: storagemgmt
subnets:
- _replaced_
mtu: 1500

# Add storagemgmt network replacements
replacements:
# NetConfig dnsDomain specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].dnsDomain
# NetConfig MTU specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.mtu
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].mtu
# NetConfig subnets specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].subnets

# Octavia support
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: octavia
fieldPaths:
- spec.config

# Storagemgmt NAD support
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: storagemgmt
fieldPaths:
- spec.config

# Storagemgmt IPAddressPool
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.lb_addresses
targets:
- select:
kind: IPAddressPool
name: storagemgmt
fieldPaths:
- spec.addresses

# Storagemgmt L2Advertisement interface
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.iface
targets:
- select:
kind: L2Advertisement
name: storagemgmt
fieldPaths:
- spec.interfaces.0

# Override ctlplane L2Advertisement to use bridgeName (ospbr) instead of ctlplane.iface (enp7s0)
- source:
kind: ConfigMap
name: network-values
fieldPath: data.bridgeName
targets:
- select:
kind: L2Advertisement
name: ctlplane
fieldPaths:
- spec.interfaces.0
8 changes: 8 additions & 0 deletions dt/dcn/networking/nad.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: octavia
labels:
osp/net: octavia
osp/net-attach-def-type: standard
22 changes: 22 additions & 0 deletions dt/dcn/networking/storagemgmt-metallb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: storagemgmt
namespace: metallb-system
labels:
osp/lb-addresses-type: standard
spec:
addresses:
- _replaced_
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: storagemgmt
namespace: metallb-system
spec:
ipAddressPools:
- storagemgmt
interfaces:
- _replaced_
8 changes: 8 additions & 0 deletions dt/dcn/networking/storagemgmt-nad.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: storagemgmt
labels:
osp/net: storagemgmt
osp/net-attach-def-type: standard
2 changes: 1 addition & 1 deletion examples/dt/dcn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This is a collection of CR templates that represent a Red Hat OpenStack Services

2. The CRs are applied against an OpenShift cluster in _stages_. That is, there is an ordering in which each grouping of CRs is fed to the cluster. It is _not_ a case of simply taking all CRs from all stages and applying them all at once.

3. In stages 1 and 2 [kustomize](https://kustomize.io/) is used to genereate the control plane CRs dynamically. The `control-plane/nncp/values.yaml` file(s) must be updated to fit your environment. kustomize version 5 or newer required.
3. In stages 1 and 2 [kustomize](https://kustomize.io/) is used to generate the control plane CRs dynamically. The `control-plane/networking/nncp/values.yaml` file(s) must be updated to fit your environment. kustomize version 5 or newer required.

4. In stages 3 and 4 [kustomize](https://kustomize.io/) is used to generate the dataplane CRs dynamically. The `edpm-pre-ceph/values.yaml`, `values.yaml` and `service-values.yaml` files must be updated to fit your environment. kustomize version 5 or newer required.

Expand Down
Loading