From 6ff8d47c57646c650896128fc790b08116e79dbe Mon Sep 17 00:00:00 2001 From: Jiri Macku Date: Fri, 7 Feb 2025 14:42:24 +0100 Subject: [PATCH] Decouple uni04delta network stage from control plane stage --- automation/net-env/uni04delta-adoption.yaml | 719 ++++++++++++++++++ automation/vars/uni04delta-adoption.yaml | 27 + automation/vars/uni04delta.yaml | 16 +- dt/uni04delta/kustomization.yaml | 48 -- dt/uni04delta/networking/kustomization.yaml | 68 ++ examples/dt/uni04delta/control-plane.md | 20 +- .../control-plane/kustomization.yaml | 2 +- .../networking/kustomization.yaml | 9 + .../{ => networking}/nncp/.gitignore | 0 .../{ => networking}/nncp/kustomization.yaml | 2 +- .../{ => networking}/nncp/values.yaml | 0 examples/dt/uni04delta/kustomization.yaml | 2 +- zuul.d/projects.yaml | 1 + zuul.d/validations.yaml | 14 +- 14 files changed, 870 insertions(+), 58 deletions(-) create mode 100644 automation/net-env/uni04delta-adoption.yaml create mode 100644 automation/vars/uni04delta-adoption.yaml create mode 100644 dt/uni04delta/networking/kustomization.yaml create mode 100644 examples/dt/uni04delta/control-plane/networking/kustomization.yaml rename examples/dt/uni04delta/control-plane/{ => networking}/nncp/.gitignore (100%) rename examples/dt/uni04delta/control-plane/{ => networking}/nncp/kustomization.yaml (93%) rename examples/dt/uni04delta/control-plane/{ => networking}/nncp/values.yaml (100%) diff --git a/automation/net-env/uni04delta-adoption.yaml b/automation/net-env/uni04delta-adoption.yaml new file mode 100644 index 000000000..ed9c17428 --- /dev/null +++ b/automation/net-env/uni04delta-adoption.yaml @@ -0,0 +1,719 @@ +--- +instances: + ceph-0: + hostname: ceph-0 + name: ceph-0 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.111 + mac_addr: "52:54:00:3a:60:69" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: ctlplane + prefix_length_v4: 24 + skip_nm: false + external: + interface_name: eth1 + ip_v4: 10.46.22.135 + mac_addr: "52:54:00:3a:60:69" + mtu: 1500 + netmask_v4: 255.255.255.192 + network_name: external + prefix_length_v4: 26 + skip_nm: false + internalapi: + interface_name: eth1.120 + ip_v4: 172.17.0.111 + mac_addr: "52:54:00:34:8e:48" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: internalapi + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 120 + storage: + interface_name: eth1.121 + ip_v4: 172.18.0.111 + mac_addr: "52:54:00:10:9b:1d" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storage + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 121 + storagemgmt: + interface_name: eth1.123 + ip_v4: 172.20.0.111 + mac_addr: "52:54:00:0d:e9:95" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storagemgmt + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 123 + ceph-1: + hostname: ceph-1 + name: ceph-1 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.112 + mac_addr: "52:54:00:f0:a5:5f" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: ctlplane + prefix_length_v4: 24 + skip_nm: false + external: + interface_name: eth1 + ip_v4: 10.46.22.136 + mac_addr: "52:54:00:f0:a5:5f" + mtu: 1500 + netmask_v4: 255.255.255.192 + network_name: external + prefix_length_v4: 26 + skip_nm: false + internalapi: + interface_name: eth1.120 + ip_v4: 172.17.0.112 + mac_addr: "52:54:00:77:8d:d0" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: internalapi + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 120 + storage: + interface_name: eth1.121 + ip_v4: 172.18.0.112 + mac_addr: "52:54:00:35:fc:f2" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storage + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 121 + storagemgmt: + interface_name: eth1.123 + ip_v4: 172.20.0.112 + mac_addr: "52:54:00:01:27:76" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storagemgmt + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 123 + ceph-2: + hostname: ceph-2 + name: ceph-2 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.113 + mac_addr: "52:54:00:55:f7:08" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: ctlplane + prefix_length_v4: 24 + skip_nm: false + external: + interface_name: eth1 + ip_v4: 10.46.22.137 + mac_addr: "52:54:00:55:f7:08" + mtu: 1500 + netmask_v4: 255.255.255.192 + network_name: external + prefix_length_v4: 26 + skip_nm: false + internalapi: + interface_name: eth1.120 + ip_v4: 172.17.0.113 + mac_addr: "52:54:00:01:23:43" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: internalapi + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 120 + storage: + interface_name: eth1.121 + ip_v4: 172.18.0.113 + mac_addr: "52:54:00:3a:1f:2f" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storage + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 121 + storagemgmt: + interface_name: eth1.123 + ip_v4: 172.20.0.113 + mac_addr: "52:54:00:23:96:dc" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storagemgmt + parent_interface: eth1 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 123 + controller-0: + hostname: controller-0 + name: controller-0 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.9 + mac_addr: "52:54:00:aa:40:6d" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: ctlplane + prefix_length_v4: 24 + skip_nm: false + ocp-0: + hostname: osasinfra-master-0 + name: ocp-0 + networks: + ctlplane: + interface_name: enp6s0 + ip_v4: 192.168.122.10 + mac_addr: "52:54:00:28:4f:f0" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: ctlplane + prefix_length_v4: 24 + skip_nm: false + internalapi: + interface_name: enp6s0.120 + ip_v4: 172.17.0.10 + mac_addr: "52:54:00:56:0a:fb" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: internalapi + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 120 + octavia: + interface_name: enp6s0.124 + ip_v4: 172.23.0.10 + mac_addr: "52:54:00:14:51:28" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: octavia + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 124 + storage: + interface_name: enp6s0.121 + ip_v4: 172.18.0.10 + mac_addr: "52:54:00:62:0d:a2" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storage + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 121 + tenant: + interface_name: enp6s0.122 + ip_v4: 172.19.0.10 + mac_addr: "52:54:00:09:be:0e" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: tenant + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 122 + ocp-1: + hostname: osasinfra-master-1 + name: ocp-1 + networks: + ctlplane: + interface_name: enp6s0 + ip_v4: 192.168.122.11 + mac_addr: "52:54:00:14:39:b5" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: ctlplane + prefix_length_v4: 24 + skip_nm: false + internalapi: + interface_name: enp6s0.120 + ip_v4: 172.17.0.11 + mac_addr: "52:54:00:7a:aa:0e" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: internalapi + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 120 + octavia: + interface_name: enp6s0.124 + ip_v4: 172.23.0.11 + mac_addr: "52:54:00:26:c9:4c" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: octavia + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 124 + storage: + interface_name: enp6s0.121 + ip_v4: 172.18.0.11 + mac_addr: "52:54:00:19:5b:d2" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storage + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 121 + tenant: + interface_name: enp6s0.122 + ip_v4: 172.19.0.11 + mac_addr: "52:54:00:1b:3e:25" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: tenant + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 122 + ocp-2: + hostname: osasinfra-master-2 + name: ocp-2 + networks: + ctlplane: + interface_name: enp6s0 + ip_v4: 192.168.122.12 + mac_addr: "52:54:00:de:3d:95" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: ctlplane + prefix_length_v4: 24 + skip_nm: false + internalapi: + interface_name: enp6s0.120 + ip_v4: 172.17.0.12 + mac_addr: "52:54:00:63:20:1c" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: internalapi + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 120 + octavia: + interface_name: enp6s0.124 + ip_v4: 172.23.0.12 + mac_addr: "52:54:00:1e:24:16" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: octavia + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 124 + storage: + interface_name: enp6s0.121 + ip_v4: 172.18.0.12 + mac_addr: "52:54:00:23:e0:ff" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: storage + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 121 + tenant: + interface_name: enp6s0.122 + ip_v4: 172.19.0.12 + mac_addr: "52:54:00:29:56:10" + mtu: 1500 + netmask_v4: 255.255.255.0 + network_name: tenant + parent_interface: enp6s0 + prefix_length_v4: 24 + skip_nm: false + vlan_id: 122 + networker-0: + hostname: networker-0 + name: networker-0 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.110 + mac_addr: "52:54:00:17:15:43" + mtu: 1500 + network_name: ctlplane + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v4: 172.17.0.110 + mac_addr: "52:54:00:05:ea:ef" + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + skip_nm: false + vlan_id: 20 + networker-1: + hostname: networker-1 + name: networker-1 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.111 + mac_addr: "52:54:00:17:16:43" + mtu: 1500 + network_name: ctlplane + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v4: 172.17.0.111 + mac_addr: "52:54:00:05:eb:ef" + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + skip_nm: false + vlan_id: 20 + networker-2: + hostname: networker-1 + name: networker-1 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.111 + mac_addr: "52:54:00:17:16:43" + mtu: 1500 + network_name: ctlplane + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v4: 172.17.0.111 + mac_addr: "52:54:00:05:eb:ef" + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + skip_nm: false + vlan_id: 20 + compute-0: + hostname: compute-0 + name: compute-0 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.100 + mac_addr: "52:54:00:17:05:43" + mtu: 1500 + network_name: ctlplane + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v4: 172.17.0.100 + mac_addr: "52:54:00:05:da:ef" + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + skip_nm: false + vlan_id: 20 + storage: + interface_name: eth1.21 + ip_v4: 172.18.0.100 + mac_addr: "52:54:00:59:8a:4c" + mtu: 1500 + network_name: storage + parent_interface: eth1 + skip_nm: false + vlan_id: 21 + tenant: + interface_name: eth1.22 + ip_v4: 172.19.0.100 + mac_addr: "52:54:00:0b:1c:d7" + mtu: 1500 + network_name: tenant + parent_interface: eth1 + skip_nm: false + vlan_id: 22 + compute-1: + hostname: compute-1 + name: compute-1 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.101 + mac_addr: "52:54:00:17:05:44" + mtu: 1500 + network_name: ctlplane + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v4: 172.17.0.101 + mac_addr: "52:54:00:05:db:00" + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + skip_nm: false + vlan_id: 20 + storage: + interface_name: eth1.21 + ip_v4: 172.18.0.101 + mac_addr: "52:54:00:59:8a:4e" + mtu: 1500 + network_name: storage + parent_interface: eth1 + skip_nm: false + vlan_id: 21 + tenant: + interface_name: eth1.22 + ip_v4: 172.19.0.101 + mac_addr: "52:54:00:0b:1c:d5" + mtu: 1500 + network_name: tenant + parent_interface: eth1 + skip_nm: false + vlan_id: 22 + compute-2: + hostname: compute-2 + name: compute-2 + networks: + ctlplane: + interface_name: eth1 + ip_v4: 192.168.122.102 + mac_addr: "52:54:00:17:05:46" + mtu: 1500 + network_name: ctlplane + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v4: 172.17.0.102 + mac_addr: "52:54:00:05:db:02" + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + skip_nm: false + vlan_id: 20 + storage: + interface_name: eth1.21 + ip_v4: 172.18.0.102 + mac_addr: "52:54:00:59:8a:50" + mtu: 1500 + network_name: storage + parent_interface: eth1 + skip_nm: false + vlan_id: 21 + tenant: + interface_name: eth1.22 + ip_v4: 172.19.0.102 + mac_addr: "52:54:00:0b:1c:d7" + mtu: 1500 + network_name: tenant + parent_interface: eth1 + skip_nm: false + vlan_id: 22 +networks: + ctlplane: + dns_v4: + - 192.168.122.1 + dns_v6: [] + gw_v4: 192.168.122.1 + mtu: 1500 + network_name: ctlplane + network_v4: 192.168.122.0/24 + search_domain: ctlplane.example.com + tools: + metallb: + ipv4_ranges: + - end: 192.168.122.90 + end_host: 90 + length: 11 + start: 192.168.122.80 + start_host: 80 + ipv6_ranges: [] + multus: + ipv4_ranges: + - end: 192.168.122.70 + end_host: 70 + length: 41 + start: 192.168.122.30 + start_host: 30 + ipv6_ranges: [] + netconfig: + ipv4_ranges: + - end: 192.168.122.120 + end_host: 120 + length: 21 + start: 192.168.122.100 + start_host: 100 + ipv6_ranges: [] + external: + dns_v4: + - 10.46.22.128 + dns_v6: [] + gw_v4: 10.46.22.189 + mtu: 1500 + network_name: external + network_v4: 10.46.22.128/26 + search_domain: external.example.com + tools: + netconfig: + ipv4_ranges: + - end: 10.46.22.143 + end_host: 15 + length: 13 + start: 10.46.22.131 + start_host: 3 + ipv6_ranges: [] + internalapi: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: internalapi + network_v4: 172.17.0.0/24 + search_domain: internalapi.example.com + tools: + metallb: + ipv4_ranges: + - end: 172.17.0.90 + end_host: 90 + length: 11 + start: 172.17.0.80 + start_host: 80 + ipv6_ranges: [] + multus: + ipv4_ranges: + - end: 172.17.0.70 + end_host: 70 + length: 41 + start: 172.17.0.30 + start_host: 30 + ipv6_ranges: [] + netconfig: + ipv4_ranges: + - end: 172.17.0.250 + end_host: 250 + length: 151 + start: 172.17.0.100 + start_host: 100 + ipv6_ranges: [] + vlan_id: 120 + octavia: + dns_v4: [] + dns_v6: [] + network_name: octavia + network_v4: 172.23.0.0/24 + search_domain: octavia.example.com + tools: + multus: + ipv4_ranges: + - end: 172.23.0.70 + end_host: 70 + length: 41 + start: 172.23.0.30 + start_host: 30 + ipv6_ranges: [] + netconfig: + ipv4_ranges: + - end: 172.23.0.250 + end_host: 250 + length: 151 + start: 172.23.0.100 + start_host: 100 + ipv6_ranges: [] + vlan_id: 124 + storage: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: storage + network_v4: 172.18.0.0/24 + search_domain: storage.example.com + tools: + metallb: + ipv4_ranges: + - end: 172.18.0.90 + end_host: 90 + length: 11 + start: 172.18.0.80 + start_host: 80 + ipv6_ranges: [] + multus: + ipv4_ranges: + - end: 172.18.0.70 + end_host: 70 + length: 41 + start: 172.18.0.30 + start_host: 30 + ipv6_ranges: [] + netconfig: + ipv4_ranges: + - end: 172.18.0.250 + end_host: 250 + length: 151 + start: 172.18.0.100 + start_host: 100 + ipv6_ranges: [] + vlan_id: 121 + storagemgmt: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: storagemgmt + network_v4: 172.20.0.0/24 + search_domain: storagemgmt.example.com + tools: + netconfig: + ipv4_ranges: + - end: 172.20.0.250 + end_host: 250 + length: 151 + start: 172.20.0.100 + start_host: 100 + ipv6_ranges: [] + vlan_id: 123 + tenant: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: tenant + network_v4: 172.19.0.0/24 + search_domain: tenant.example.com + tools: + metallb: + ipv4_ranges: + - end: 172.19.0.90 + end_host: 90 + length: 11 + start: 172.19.0.80 + start_host: 80 + ipv6_ranges: [] + multus: + ipv4_ranges: + - end: 172.19.0.70 + end_host: 70 + length: 41 + start: 172.19.0.30 + start_host: 30 + ipv6_ranges: [] + netconfig: + ipv4_ranges: + - end: 172.19.0.250 + end_host: 250 + length: 151 + start: 172.19.0.100 + start_host: 100 + ipv6_ranges: [] + vlan_id: 122 +routers: {} diff --git a/automation/vars/uni04delta-adoption.yaml b/automation/vars/uni04delta-adoption.yaml new file mode 100644 index 000000000..5d22bb6ac --- /dev/null +++ b/automation/vars/uni04delta-adoption.yaml @@ -0,0 +1,27 @@ +--- +vas: + uni04delta-adoption: + stages: + - path: examples/dt/uni04delta/control-plane/networking/nncp + wait_conditions: + - >- + oc -n openstack wait nncp + -l osp/nncm-config-type=standard + --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured + --timeout=5m + values: + - name: network-values + src_file: values.yaml + build_output: nncp.yaml + + - path: examples/dt/uni04delta/control-plane/networking + wait_conditions: + - >- + oc -n metallb-system wait pod + -l app=metallb -l component=speaker + --for condition=Ready + --timeout=5min + values: + - name: network-values + src_file: nncp/values.yaml + build_output: networking.yaml diff --git a/automation/vars/uni04delta.yaml b/automation/vars/uni04delta.yaml index 0c413a8c9..c9ea8e9dd 100644 --- a/automation/vars/uni04delta.yaml +++ b/automation/vars/uni04delta.yaml @@ -2,7 +2,7 @@ vas: uni04delta: stages: - - path: examples/dt/uni04delta/control-plane/nncp + - path: examples/dt/uni04delta/control-plane/networking/nncp wait_conditions: - >- oc -n openstack wait nncp @@ -14,6 +14,18 @@ vas: src_file: values.yaml build_output: nncp.yaml + - path: examples/dt/uni04delta/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 + - path: examples/dt/uni04delta/control-plane wait_conditions: - >- @@ -22,7 +34,7 @@ vas: --timeout=60m values: - name: network-values - src_file: nncp/values.yaml + src_file: networking/nncp/values.yaml - name: service-values.yaml src_file: service-values.yaml build_output: control-plane.yaml diff --git a/dt/uni04delta/kustomization.yaml b/dt/uni04delta/kustomization.yaml index 308a0533e..e34295b27 100644 --- a/dt/uni04delta/kustomization.yaml +++ b/dt/uni04delta/kustomization.yaml @@ -17,57 +17,9 @@ transformers: create: true components: - - ../../lib/networking/metallb - - ../../lib/networking/netconfig - - ../../lib/networking/nad - ../../lib/control-plane -patches: - - target: - version: v1beta1 - kind: NetConfig - name: netconfig - patch: |- - - op: add - path: /spec/networks/- - value: - dnsDomain: _replaced_ - name: storagemgmt - subnets: - - _replaced_ - mtu: 1500 - replacements: - - source: - kind: ConfigMap - name: network-values - fieldPath: data.storagemgmt.dnsDomain - targets: - - select: - kind: NetConfig - fieldPaths: - - spec.networks.[name=storagemgmt].dnsDomain - - - source: - kind: ConfigMap - name: network-values - fieldPath: data.storagemgmt.mtu - targets: - - select: - kind: NetConfig - fieldPaths: - - spec.networks.[name=storagemgmt].mtu - - - source: - kind: ConfigMap - name: network-values - fieldPath: data.storagemgmt.subnets - targets: - - select: - kind: NetConfig - fieldPaths: - - spec.networks.[name=storagemgmt].subnets - - source: kind: ConfigMap name: service-values diff --git a/dt/uni04delta/networking/kustomization.yaml b/dt/uni04delta/networking/kustomization.yaml new file mode 100644 index 000000000..dab60ae27 --- /dev/null +++ b/dt/uni04delta/networking/kustomization.yaml @@ -0,0 +1,68 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + - |- + 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 + +patches: + - target: + version: v1beta1 + kind: NetConfig + name: netconfig + patch: |- + - op: add + path: /spec/networks/- + value: + dnsDomain: _replaced_ + name: storagemgmt + subnets: + - _replaced_ + mtu: 1500 + +replacements: + - source: + kind: ConfigMap + name: network-values + fieldPath: data.storagemgmt.dnsDomain + targets: + - select: + kind: NetConfig + fieldPaths: + - spec.networks.[name=storagemgmt].dnsDomain + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.storagemgmt.mtu + targets: + - select: + kind: NetConfig + fieldPaths: + - spec.networks.[name=storagemgmt].mtu + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.storagemgmt.subnets + targets: + - select: + kind: NetConfig + fieldPaths: + - spec.networks.[name=storagemgmt].subnets diff --git a/examples/dt/uni04delta/control-plane.md b/examples/dt/uni04delta/control-plane.md index 472517693..c7559ed2f 100644 --- a/examples/dt/uni04delta/control-plane.md +++ b/examples/dt/uni04delta/control-plane.md @@ -18,11 +18,14 @@ Change to uni04delta directory cd architecture/examples/dt/uni04delta ``` -Apply the required network configurations. +# Apply the required node network configurations. +```bash +vi control-plane/networking/nncp/values.yaml +``` ```bash # Change the Node Network Configuration folder. -pushd control-plane/nncp +pushd control-plane/networking/nncp # Generate the configuration kustomize build > nncp.yaml @@ -38,8 +41,18 @@ oc wait nncp -l osp/nncm-config-type=standard \ # change the working directory popd ``` +# Apply remainig networking configuration + +Generate the remaining networking configuration +```bash +kustomize build control-plane/networking > networking.yaml +``` +Apply the networking CRs +```bash +oc apply -f networking.yaml +``` -Generate and apply the control-plane configurations. +# Generate and apply the control-plane configurations. ```bash # Navigate to control-panel @@ -56,4 +69,3 @@ oc wait openstackcontrolplane --for condition=Ready --timeout=600s # change the work_dir popd -``` diff --git a/examples/dt/uni04delta/control-plane/kustomization.yaml b/examples/dt/uni04delta/control-plane/kustomization.yaml index 209232e3c..dcb80554a 100644 --- a/examples/dt/uni04delta/control-plane/kustomization.yaml +++ b/examples/dt/uni04delta/control-plane/kustomization.yaml @@ -6,5 +6,5 @@ components: - ../../../../dt/uni04delta/ resources: - - nncp/values.yaml + - networking/nncp/values.yaml - service-values.yaml diff --git a/examples/dt/uni04delta/control-plane/networking/kustomization.yaml b/examples/dt/uni04delta/control-plane/networking/kustomization.yaml new file mode 100644 index 000000000..a212013b1 --- /dev/null +++ b/examples/dt/uni04delta/control-plane/networking/kustomization.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../dt/uni04delta/networking + +resources: + - nncp/values.yaml diff --git a/examples/dt/uni04delta/control-plane/nncp/.gitignore b/examples/dt/uni04delta/control-plane/networking/nncp/.gitignore similarity index 100% rename from examples/dt/uni04delta/control-plane/nncp/.gitignore rename to examples/dt/uni04delta/control-plane/networking/nncp/.gitignore diff --git a/examples/dt/uni04delta/control-plane/nncp/kustomization.yaml b/examples/dt/uni04delta/control-plane/networking/nncp/kustomization.yaml similarity index 93% rename from examples/dt/uni04delta/control-plane/nncp/kustomization.yaml rename to examples/dt/uni04delta/control-plane/networking/nncp/kustomization.yaml index 94653e805..16ee114a6 100644 --- a/examples/dt/uni04delta/control-plane/nncp/kustomization.yaml +++ b/examples/dt/uni04delta/control-plane/networking/nncp/kustomization.yaml @@ -17,7 +17,7 @@ transformers: create: true components: - - ../../../../../lib/nncp + - ../../../../../../lib/nncp resources: - values.yaml diff --git a/examples/dt/uni04delta/control-plane/nncp/values.yaml b/examples/dt/uni04delta/control-plane/networking/nncp/values.yaml similarity index 100% rename from examples/dt/uni04delta/control-plane/nncp/values.yaml rename to examples/dt/uni04delta/control-plane/networking/nncp/values.yaml diff --git a/examples/dt/uni04delta/kustomization.yaml b/examples/dt/uni04delta/kustomization.yaml index 9a8e357f2..1b0766f38 100644 --- a/examples/dt/uni04delta/kustomization.yaml +++ b/examples/dt/uni04delta/kustomization.yaml @@ -6,6 +6,6 @@ components: - ../../../dt/uni04delta/edpm/nodeset resources: - - control-plane/nncp/values.yaml + - control-plane/networking/nncp/values.yaml - control-plane/service-values.yaml - values.yaml diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 7c295b8ed..58bc2e534 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -22,6 +22,7 @@ - rhoso-architecture-validate-uni01alpha-adoption - rhoso-architecture-validate-uni02beta - rhoso-architecture-validate-uni04delta + - rhoso-architecture-validate-uni04delta-adoption - rhoso-architecture-validate-uni04delta-ipv6 - rhoso-architecture-validate-uni05epsilon - rhoso-architecture-validate-uni06zeta diff --git a/zuul.d/validations.yaml b/zuul.d/validations.yaml index e1ef368d0..fe81c6dc0 100644 --- a/zuul.d/validations.yaml +++ b/zuul.d/validations.yaml @@ -247,7 +247,8 @@ - dt/uni04delta - examples/dt/uni04delta - examples/dt/uni04delta/control-plane - - examples/dt/uni04delta/control-plane/nncp + - examples/dt/uni04delta/control-plane/networking + - examples/dt/uni04delta/control-plane/networking/nncp - examples/dt/uni04delta/deployment - examples/dt/uni04delta/edpm-pre-ceph - examples/dt/uni04delta/edpm-pre-ceph/nodeset @@ -257,6 +258,17 @@ vars: cifmw_architecture_scenario: uni04delta cifmw_networking_env_def_file: automation/net-env/uni04delta.yaml +- job: + files: + - automation/net-env/uni04delta-adoption.yaml + - examples/dt/uni04delta/control-plane/networking + - examples/dt/uni04delta/control-plane/networking/nncp + - lib + name: rhoso-architecture-validate-uni04delta-adoption + parent: rhoso-architecture-base-job + vars: + cifmw_architecture_scenario: uni04delta-adoption + cifmw_networking_env_def_file: automation/net-env/uni04delta-adoption.yaml - job: files: - automation/mocks/uni04delta-ipv6.yaml