From f45dc7584f4aef27a793f858fb60990b3239d5f4 Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Mon, 19 Aug 2024 16:12:21 +0200 Subject: [PATCH] WIP: Add BGP DT03 IPv6 OSPRH-9552 Depends-On: https://github.com/openstack-k8s-operators/ci-framework/pull/2241 --- automation/mocks/bgp_dt03_ipv6.yaml | 2 + automation/net-env/bgp_dt03_ipv6.yaml | 857 +++++++++++++ automation/vars/bgp.yaml | 78 ++ examples/dt/bgp/bgp_dt03_ipv6/README.md | 109 ++ .../dt/bgp/bgp_dt03_ipv6/configure-taints.md | 21 + .../dt/bgp/bgp_dt03_ipv6/control-plane.md | 57 + .../control-plane/kustomization.yaml | 293 +++++ .../control-plane/metallb_bgppeers.yaml | 112 ++ .../control-plane/nncp/.gitignore | 1 + .../control-plane/nncp/kustomization.yaml | 1120 +++++++++++++++++ .../nncp/ocp_worker_nodes_nncp.yaml | 28 + .../control-plane/nncp/values.yaml | 524 ++++++++ .../control-plane/ocp_network_template.yaml | 8 + .../control-plane/ocp_networks_netattach.yaml | 19 + .../control-plane/service-values.yaml | 97 ++ examples/dt/bgp/bgp_dt03_ipv6/data-plane.md | 74 ++ .../edpm/computes/kustomization.yaml | 20 + .../bgp_dt03_ipv6/edpm/computes/values.yaml | 261 ++++ .../edpm/deployment/kustomization.yaml | 22 + .../bgp_dt03_ipv6/edpm/deployment/values.yaml | 12 + .../edpm/networkers/kustomization.yaml | 29 + .../bgp_dt03_ipv6/edpm/networkers/values.yaml | 261 ++++ .../dt/bgp/bgp_dt03_ipv6/metallb/README.md | 16 + .../bgp_dt03_ipv6/metallb/kustomization.yaml | 19 + zuul.d/projects.yaml | 1 + zuul.d/validations.yaml | 15 + 26 files changed, 4056 insertions(+) create mode 100644 automation/mocks/bgp_dt03_ipv6.yaml create mode 100644 automation/net-env/bgp_dt03_ipv6.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/README.md create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/configure-taints.md create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane.md create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/kustomization.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/metallb_bgppeers.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/.gitignore create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/kustomization.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/ocp_worker_nodes_nncp.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/values.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/ocp_network_template.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/ocp_networks_netattach.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/control-plane/service-values.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/data-plane.md create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/edpm/computes/kustomization.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/edpm/computes/values.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment/kustomization.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment/values.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers/kustomization.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers/values.yaml create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/metallb/README.md create mode 100644 examples/dt/bgp/bgp_dt03_ipv6/metallb/kustomization.yaml diff --git a/automation/mocks/bgp_dt03_ipv6.yaml b/automation/mocks/bgp_dt03_ipv6.yaml new file mode 100644 index 000000000..b321fc875 --- /dev/null +++ b/automation/mocks/bgp_dt03_ipv6.yaml @@ -0,0 +1,2 @@ +--- +cifmw_ci_gen_kustomize_values_primary_ip_version: 6 diff --git a/automation/net-env/bgp_dt03_ipv6.yaml b/automation/net-env/bgp_dt03_ipv6.yaml new file mode 100644 index 000000000..c86869519 --- /dev/null +++ b/automation/net-env/bgp_dt03_ipv6.yaml @@ -0,0 +1,857 @@ +--- +instances: + compute-0: + hostname: compute-0 + name: compute-0 + networks: + ctlplane: + interface_name: eth1 + ip_v6: 2620:cf:cf:aaaa::100 + is_trunk_parent: true + mac_addr: 52:54:00:6a:4a:25 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v6: 2620:cf:cf:bbbb::100 + is_trunk_parent: false + mac_addr: 52:54:00:14:8c:e5 + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + storage: + interface_name: eth1.21 + ip_v6: 2620:cf:cf:cccc::100 + is_trunk_parent: false + mac_addr: 52:54:00:0d:c3:a1 + mtu: 1500 + network_name: storage + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: eth1.22 + ip_v6: 2620:cf:cf:eeee::100 + is_trunk_parent: false + mac_addr: "52:54:00:16:41:11" + mtu: 1500 + network_name: tenant + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + compute-1: + hostname: compute-1 + name: compute-1 + networks: + ctlplane: + interface_name: eth1 + ip_v6: 2620:cf:cf:aaaa::101 + is_trunk_parent: true + mac_addr: 52:54:00:9b:e6:98 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v6: 2620:cf:cf:bbbb::101 + is_trunk_parent: false + mac_addr: 52:54:00:38:f8:36 + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + storage: + interface_name: eth1.21 + ip_v6: 2620:cf:cf:cccc::101 + is_trunk_parent: false + mac_addr: 52:54:00:4d:c4:0b + mtu: 1500 + network_name: storage + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: eth1.22 + ip_v6: 2620:cf:cf:eeee::101 + is_trunk_parent: false + mac_addr: 52:54:00:14:06:e3 + mtu: 1500 + network_name: tenant + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + compute-2: + hostname: compute-2 + name: compute-2 + networks: + ctlplane: + interface_name: eth1 + ip_v6: 2620:cf:cf:aaaa::102 + is_trunk_parent: true + mac_addr: 52:54:00:98:a6:ae + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v6: 2620:cf:cf:bbbb::102 + is_trunk_parent: false + mac_addr: 52:54:00:6a:da:29 + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + storage: + interface_name: eth1.21 + ip_v6: 2620:cf:cf:cccc::102 + is_trunk_parent: false + mac_addr: 52:54:00:03:0a:e8 + mtu: 1500 + network_name: storage + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: eth1.22 + ip_v6: 2620:cf:cf:eeee::100 + is_trunk_parent: false + mac_addr: 52:54:00:78:92:ee + mtu: 1500 + network_name: tenant + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + networker-0: + hostname: networker-0 + name: networker-0 + networks: + ctlplane: + interface_name: eth1 + ip_v6: 2620:cf:cf:aaaa::106 + is_trunk_parent: true + mac_addr: 52:54:00:15:d3:88 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v6: 2620:cf:cf:bbbb::106 + is_trunk_parent: false + mac_addr: 52:54:00:10:fd:f9 + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + tenant: + interface_name: eth1.22 + ip_v6: 2620:cf:cf:eeee::106 + is_trunk_parent: false + mac_addr: '52:54:00:42:16:57' + mtu: 1500 + network_name: tenant + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + networker-1: + hostname: networker-1 + name: networker-1 + networks: + ctlplane: + interface_name: eth1 + ip_v6: 2620:cf:cf:aaaa::107 + is_trunk_parent: true + mac_addr: 52:54:00:de:46:aa + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v6: 2620:cf:cf:bbbb::107 + is_trunk_parent: false + mac_addr: 52:54:00:3c:46:9b + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + tenant: + interface_name: eth1.22 + ip_v6: 2620:cf:cf:eeee::107 + is_trunk_parent: false + mac_addr: 52:54:00:6c:66:38 + mtu: 1500 + network_name: tenant + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + networker-2: + hostname: networker-2 + name: networker-2 + networks: + ctlplane: + interface_name: eth1 + ip_v6: 2620:cf:cf:aaaa::108 + is_trunk_parent: true + mac_addr: 52:54:00:3f:b8:15 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: eth1.20 + ip_v6: 2620:cf:cf:bbbb::108 + is_trunk_parent: false + mac_addr: 52:54:00:7c:e7:5f + mtu: 1500 + network_name: internalapi + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + tenant: + interface_name: eth1.22 + ip_v6: 2620:cf:cf:eeee::108 + is_trunk_parent: false + mac_addr: 52:54:00:12:ef:f8 + mtu: 1500 + network_name: tenant + parent_interface: eth1 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + controller-0: + hostname: controller-0 + name: controller-0 + networks: + ctlplane: + interface_name: eth1 + ip_v6: 2620:cf:cf:aaaa::9 + mac_addr: 52:54:00:b2:7c:cb + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + ocp-0: + hostname: master-0 + name: ocp-0 + networks: + ctlplane: + interface_name: enp8s0 + ip_v6: 2620:cf:cf:aaaa::10 + is_trunk_parent: true + mac_addr: 52:54:00:a6:a2:28 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: enp8s0.20 + ip_v6: 2620:cf:cf:bbbb::10 + is_trunk_parent: false + mac_addr: 52:54:00:4d:b7:40 + mtu: 1500 + network_name: internalapi + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + ironic: + interface_name: enp9s0 + ip_v6: 2620:cf:cf:ffff::10 + mac_addr: 52:54:00:c2:32:a2 + mtu: 1500 + network_name: ironic + prefix_length_v6: 64 + skip_nm: false + storage: + interface_name: enp8s0.21 + ip_v6: 2620:cf:cf:cccc::10 + is_trunk_parent: false + mac_addr: 52:54:00:1d:70:f5 + mtu: 1500 + network_name: storage + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: enp8s0.22 + ip_v6: 2620:cf:cf:eeee::10 + is_trunk_parent: false + mtu: 1500 + network_name: tenant + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + ocp-1: + hostname: master-1 + name: ocp-1 + networks: + ctlplane: + interface_name: enp8s0 + ip_v6: 2620:cf:cf:aaaa::11 + is_trunk_parent: true + mac_addr: 52:54:00:5d:5c:75 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: enp8s0.20 + ip_v6: 2620:cf:cf:bbbb::11 + is_trunk_parent: false + mac_addr: 52:54:00:43:51:94 + mtu: 1500 + network_name: internalapi + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + ironic: + interface_name: enp9s0 + ip_v6: 2620:cf:cf:ffff::11 + mac_addr: 52:54:00:c2:32:a3 + mtu: 1500 + network_name: ironic + prefix_length_v6: 64 + skip_nm: false + storage: + interface_name: enp8s0.21 + ip_v6: 2620:cf:cf:cccc::11 + is_trunk_parent: false + mac_addr: 52:54:00:4e:3f:30 + mtu: 1500 + network_name: storage + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: enp8s0.22 + ip_v6: 2620:cf:cf:eeee::11 + is_trunk_parent: false + mac_addr: "52:54:00:52:32:54" + mtu: 1500 + network_name: tenant + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + ocp-2: + hostname: master-2 + name: ocp-2 + networks: + ctlplane: + interface_name: enp8s0 + ip_v6: 2620:cf:cf:aaaa::12 + is_trunk_parent: true + mac_addr: 52:54:00:51:83:2d + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: enp8s0.20 + ip_v6: 2620:cf:cf:bbbb::12 + is_trunk_parent: true + mac_addr: 52:54:00:5c:31:ac + mtu: 1500 + network_name: internalapi + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + ironic: + interface_name: enp9s0 + ip_v6: 2620:cf:cf:ffff::12 + mac_addr: 52:54:00:c2:32:a4 + mtu: 1500 + network_name: ironic + prefix_length_v6: 64 + skip_nm: false + storage: + interface_name: enp8s0.21 + ip_v6: 2620:cf:cf:cccc::12 + is_trunk_parent: false + mac_addr: 52:54:00:2e:71:ce + mtu: 1500 + network_name: storage + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: enp8s0.22 + ip_v6: 2620:cf:cf:eeee::12 + is_trunk_parent: false + mac_addr: 52:54:00:2f:c7:35 + mtu: 1500 + network_name: tenant + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + ocp_worker-0: + hostname: worker-0 + name: ocp_worker-0 + networks: + ctlplane: + interface_name: enp8s0 + ip_v6: 2620:cf:cf:aaaa::13 + is_trunk_parent: true + mac_addr: 52:54:00:b6:a2:28 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: enp8s0.20 + ip_v6: 2620:cf:cf:bbbb::13 + is_trunk_parent: false + mac_addr: 52:54:00:bd:b7:40 + mtu: 1500 + network_name: internalapi + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + ironic: + interface_name: enp9s0 + ip_v6: 2620:cf:cf:ffff::13 + mac_addr: 52:54:00:b2:32:a2 + mtu: 1500 + network_name: ironic + prefix_length_v6: 64 + skip_nm: false + storage: + interface_name: enp8s0.21 + ip_v6: 2620:cf:cf:cccc::13 + is_trunk_parent: false + mac_addr: 52:54:00:bd:70:f5 + mtu: 1500 + network_name: storage + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: enp8s0.22 + ip_v6: 2620:cf:cf:eeee::13 + is_trunk_parent: false + mtu: 1500 + network_name: tenant + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + ocp_worker-1: + hostname: worker-1 + name: ocp_worker-1 + networks: + ctlplane: + interface_name: enp8s0 + ip_v6: 2620:cf:cf:aaaa::14 + is_trunk_parent: true + mac_addr: 52:54:00:c6:a2:28 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: enp8s0.20 + ip_v6: 2620:cf:cf:bbbb::14 + is_trunk_parent: false + mac_addr: 52:54:00:cd:b7:40 + mtu: 1500 + network_name: internalapi + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + ironic: + interface_name: enp9s0 + ip_v6: 2620:cf:cf:ffff::14 + mac_addr: 52:54:00:c2:32:a2 + mtu: 1500 + network_name: ironic + prefix_length_v6: 64 + skip_nm: false + storage: + interface_name: enp8s0.21 + ip_v6: 2620:cf:cf:cccc::14 + is_trunk_parent: false + mac_addr: 52:54:00:cd:70:f5 + mtu: 1500 + network_name: storage + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: enp8s0.22 + ip_v6: 2620:cf:cf:eeee::14 + is_trunk_parent: false + mtu: 1500 + network_name: tenant + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + ocp_worker-2: + hostname: worker-2 + name: ocp_worker-2 + networks: + ctlplane: + interface_name: enp8s0 + ip_v6: 2620:cf:cf:aaaa::15 + is_trunk_parent: true + mac_addr: 52:54:00:d6:a2:28 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: enp8s0.20 + ip_v6: 2620:cf:cf:bbbb::15 + is_trunk_parent: false + mac_addr: 52:54:00:dd:b7:40 + mtu: 1500 + network_name: internalapi + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + ironic: + interface_name: enp9s0 + ip_v6: 2620:cf:cf:ffff::15 + mac_addr: 52:54:00:d2:32:a2 + mtu: 1500 + network_name: ironic + prefix_length_v6: 64 + skip_nm: false + storage: + interface_name: enp8s0.21 + ip_v6: 2620:cf:cf:cccc::15 + is_trunk_parent: false + mac_addr: 52:54:00:dd:70:f5 + mtu: 1500 + network_name: storage + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: enp8s0.22 + ip_v6: 2620:cf:cf:eeee::15 + is_trunk_parent: false + mtu: 1500 + network_name: tenant + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 + ocp_worker-3: + hostname: worker-3 + name: ocp_worker-3 + networks: + ctlplane: + interface_name: enp7s0 + ip_v6: 2620:cf:cf:aaaa::16 + is_trunk_parent: true + mac_addr: 52:54:00:67:1b:c5 + mtu: 1500 + network_name: ctlplane + prefix_length_v6: 64 + skip_nm: false + internalapi: + interface_name: enp7s0.20 + ip_v6: 2620:cf:cf:bbbb::16 + is_trunk_parent: false + mac_addr: 52:54:00:65:17:db + mtu: 1500 + network_name: internalapi + parent_interface: enp8s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 20 + ironic: + interface_name: enp9s0 + ip_v6: 2620:cf:cf:ffff::16 + mac_addr: 52:54:00:c2:32:f2 + mtu: 1500 + network_name: ironic + prefix_length_v6: 64 + skip_nm: false + storage: + interface_name: enp7s0.21 + ip_v6: 2620:cf:cf:cccc::16 + is_trunk_parent: false + mac_addr: 52:54:00:46:68:6b + mtu: 1500 + network_name: storage + parent_interface: enp7s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 21 + tenant: + interface_name: enp7s0.22 + ip_v6: 2620:cf:cf:eeee::16 + is_trunk_parent: false + mac_addr: 52:54:00:31:3b:02 + mtu: 1500 + network_name: tenant + parent_interface: enp7s0 + prefix_length_v6: 64 + skip_nm: false + trunk_parent: ctlplane + vlan_id: 22 +networks: + ctlplane: + dns_v4: [] + dns_v6: + - 2620:cf:cf:aaaa::1 + gw_v6: 2620:cf:cf:aaaa::1 + mtu: 1500 + network_name: ctlplane + network_v6: 2620:cf:cf:aaaa::/64 + search_domain: ctlplane.example.com + tools: + metallb: + ipv6_ranges: + - end: 2620:cf:cf:aaaa::90 + end_host: 90 + length: 11 + start: 2620:cf:cf:aaaa::80 + start_host: 80 + ipv4_ranges: [] + multus: + ipv6_ranges: + - end: 2620:cf:cf:aaaa::70 + end_host: 70 + length: 41 + start: 2620:cf:cf:aaaa::30 + start_host: 30 + ipv4_ranges: [] + netconfig: + ipv6_ranges: + - end: 2620:cf:cf:aaaa::120 + end_host: 120 + length: 21 + start: 2620:cf:cf:aaaa::100 + start_host: 100 + - end: 2620:cf:cf:aaaa::200 + end_host: 200 + length: 51 + start: 2620:cf:cf:aaaa::150 + start_host: 150 + ipv4_ranges: [] + external: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: external + network_v6: 2620:cf:cf:cf02::/64 + search_domain: external.example.com + tools: + netconfig: + ipv6_ranges: + - end: 2620:cf:cf:cf02::250 + end_host: 250 + length: 121 + start: 2620:cf:cf:cf02::130 + start_host: 130 + ipv4_ranges: [] + vlan_id: 22 + internalapi: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: internalapi + network_v6: 2620:cf:cf:bbbb::0/64 + search_domain: internalapi.example.com + tools: + metallb: + ipv6_ranges: + - end: 2620:cf:cf:bbbb::90 + end_host: 90 + length: 11 + start: 2620:cf:cf:bbbb::80 + start_host: 80 + ipv4_ranges: [] + multus: + ipv6_ranges: + - end: 2620:cf:cf:bbbb::70 + end_host: 70 + length: 41 + start: 2620:cf:cf:bbbb::30 + start_host: 30 + ipv4_ranges: [] + netconfig: + ipv6_ranges: + - end: 2620:cf:cf:bbbb::250 + end_host: 250 + length: 151 + start: 2620:cf:cf:bbbb::100 + start_host: 100 + ipv4_ranges: [] + vlan_id: 20 + ironic: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: ironic + network_v6: 2620:cf:cf:ffff::0/64 + search_domain: ironic.example.com + tools: + multus: + ipv6_ranges: + - end: 2620:cf:cf:ffff::70 + end_host: 70 + length: 41 + start: 2620:cf:cf:ffff::30 + start_host: 30 + ipv4_ranges: [] + storage: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: storage + network_v6: 2620:cf:cf:cccc::0/64 + search_domain: storage.example.com + tools: + metallb: + ipv6_ranges: + - end: 2620:cf:cf:cccc::90 + end_host: 90 + length: 11 + start: 2620:cf:cf:cccc::80 + start_host: 80 + ipv4_ranges: [] + multus: + ipv6_ranges: + - end: 2620:cf:cf:cccc::70 + end_host: 70 + length: 41 + start: 2620:cf:cf:cccc::30 + start_host: 30 + ipv4_ranges: [] + netconfig: + ipv6_ranges: + - end: 2620:cf:cf:cccc::250 + end_host: 250 + length: 151 + start: 2620:cf:cf:cccc::100 + start_host: 100 + ipv4_ranges: [] + vlan_id: 21 + storagemgmt: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: storagemgmt + network_v6: 2620:cf:cf:dddd::0/64 + search_domain: storagemgmt.example.com + tools: + netconfig: + ipv6_ranges: + - end: 2620:cf:cf:dddd::250 + end_host: 250 + length: 151 + start: 2620:cf:cf:dddd::100 + start_host: 100 + ipv4_ranges: [] + vlan_id: 23 + tenant: + dns_v4: [] + dns_v6: [] + mtu: 1500 + network_name: tenant + network_v6: 2620:cf:cf:eeee::0/64 + search_domain: tenant.example.com + tools: + metallb: + ipv6_ranges: + - end: 2620:cf:cf:eeee::90 + end_host: 90 + length: 11 + start: 2620:cf:cf:eeee::80 + start_host: 80 + ipv4_ranges: [] + multus: + ipv6_ranges: + - end: 2620:cf:cf:eeee::70 + end_host: 70 + length: 41 + start: 2620:cf:cf:eeee::30 + start_host: 30 + ipv4_ranges: [] + netconfig: + ipv6_ranges: + - end: 2620:cf:cf:eeee::250 + end_host: 250 + length: 151 + start: 2620:cf:cf:eeee::100 + start_host: 100 + ipv4_ranges: [] + vlan_id: 22 +routers: {} diff --git a/automation/vars/bgp.yaml b/automation/vars/bgp.yaml index 8d9c067d6..50ff558b8 100644 --- a/automation/vars/bgp.yaml +++ b/automation/vars/bgp.yaml @@ -129,3 +129,81 @@ vas: - name: edpm-deployment-values src_file: values.yaml build_output: edpm-deployment.yaml + bgp_dt03_ipv6: + stages: + - pre_stage_run: + - name: Apply taint on worker-3 + type: cr + definition: + spec: + taints: + - effect: NoSchedule + key: testOperator + value: 'true' + - effect: NoExecute + key: testOperator + value: 'true' + kind: Node + resource_name: worker-3 + state: patched + path: examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp + wait_conditions: + - >- + oc -n openstack wait nncp + -l osp/nncm-config-type=standard + --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured + --timeout=60s + values: + - name: network-values + src_file: values.yaml + build_output: nncp.yaml + + - path: examples/dt/bgp/bgp_dt03_ipv6/control-plane + wait_conditions: + - >- + oc -n openstack wait openstackcontrolplane + controlplane + --for condition=Ready + --timeout=30m + values: + - name: network-values + src_file: nncp/values.yaml + - name: service-values + src_file: service-values.yaml + build_output: control-plane.yaml + + - path: examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers + wait_conditions: + - >- + oc -n openstack wait openstackdataplanenodeset + networker-nodes + --for condition=SetupReady + --timeout=600s + values: + - name: edpm-networker-nodeset-values + src_file: values.yaml + build_output: edpm-networker-nodeset.yaml + + - path: examples/dt/bgp/bgp_dt03_ipv6/edpm/computes + wait_conditions: + - >- + oc -n openstack wait openstackdataplanenodeset + compute-nodes + --for condition=SetupReady + --timeout=600s + values: + - name: edpm-compute-nodeset-values + src_file: values.yaml + build_output: edpm-compute-nodeset.yaml + + - path: examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment + wait_conditions: + - >- + oc -n openstack wait openstackdataplanedeployment + edpm-deployment + --for condition=Ready + --timeout=3800s + values: + - name: edpm-deployment-values + src_file: values.yaml + build_output: edpm-deployment.yaml diff --git a/examples/dt/bgp/bgp_dt03_ipv6/README.md b/examples/dt/bgp/bgp_dt03_ipv6/README.md new file mode 100644 index 000000000..70aa8683a --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/README.md @@ -0,0 +1,109 @@ +# RHOSO Deployed Topology - BGP DT01 - Kernel routing and OVN NB DB driver + +This document describes the first BGP Deployed Topology (DT), used to test the +BGP Dynamic Routing functionality on Red Hat OpenStack Services on OpenShift +(RHOSO). + +The CRs included within this DT should be applied on an environment where EDPM +and OCP nodes are connected through a spine/leaf network. The BGP protocol +should be enabled on those spine and leaf routers. + +## Purpose + +This first BGP DT (DT01) tests default BGP configuration: +* Kernel routing (instead of OVN routing) +* OVN NB DB driver (instead of OVN SB DB driver) + +The OCP cluster consists on the following nodes: +* 3 OCP master nodes +* 3 OCP worker nodes +* 1 OCP worker node with special configuration (OCP tester node) + +This DT creates an OCP cluster that includes both master and worker nodes, +instead of the usual master/worker combo nodes. The reason for this is to run +disruptive tests only on the OCP workers, which host the Openstack Control +Plane services, avoiding potential issues when OCP master nodes are disrupted +that would not be relevant when testing RHOSO high availability scenarios. + +The extra OCP worker (OCP tester) is needed to run tests from it because: +* disruptive tests can be run from this worker on the other workers without + affecting the test exection +* this worker is connected to the spine/leaf routers with a special routing + configuration, so that it can reach the Openstack provider network +The OCP tester is configured so that only test pods (created by the +Openstack test-operator) run on it. + +This DT configures both compute and networker EDPM nodes. So far, networker +nodes are needed when BGP is used on RHOSO, in order to expose routes to SNAT +traffic (OVN Gateway IPs). In other words, when RHOSO is used with BGP, the OCP +workers cannot be configured as OVN Gateways. + +The OCP and EDPM nodes deployed with this DT are distributed into three +different racks. Each rack is connected to two leaves. +Hence, the distribution of the nodes in the racks is the following one: +* rack0: compute-0, networker-0, ocp-master-0, ocp-worker-0, leaf-0, leaf-1 +* rack1: compute-1, networker-1, ocp-master-1, ocp-worker-1, leaf-2, leaf-3 +* rack2: compute-2, networker-2, ocp-master-2, ocp-worker-2, leaf-4, leaf-5 + +The OCP tester (ocp-worker-3) is not included into any rack. It is not +connected to any leaves, but to a router connected to the spines, due to the +reasons described before (it needs special connectivity to reach the provider +network). + +## Node topology +| Node role | bm/vm | amount | +| ----------------------- | ----- | ------ | +| Openshift master nodes | vm | 3 | +| Openshift worker nodes | vm | 4 | +| Openstack Computes | vm | 3 | +| Openstack Networker | vm | 3 | +| Leaf routers | vm | 6 | +| Spine routers | vm | 2 | +| External routers | vm | 1 | +| Ansible Controller | vm | 1 | + +### Networks + +| Name | Type | CIDR | +| ------------------------ | -------- | ---------------- | +| Provisioning | untagged | 192.168.122.0/24 | +| Provider network | untagged | 192.168.133.0/24 | +| RH OSP | untagged | 192.168.111.0/24 | +| edpm/ocp to left leaves | untagged | 100.64.x.y/30 | +| edpm/ocp to right leaves | untagged | 100.65.x.y/30 | + +## Services, enabled features and configurations + +| Service | configuration | Lock-in coverage? | +| ---------------- | ---------------- | ------------------ | +| Glance | Swift | Must have | +| Swift | (default) | Must have | +| Octavia | (default) | Must have | +| Heat | (default) | Must have | +| frr | dataplane | Must have | +| ovn-bgp-agent | dataplane | Must have | + +## Considerations/Constraints + +1. Virtual networks should be created to connect the nodes to the routers. +2. All the VMs that are neither Openstack nor Openshift nodes, i.e. those that + act as routers, need to be properly configured in order to support the BGP + protocol. +3. The spine/leaf topology separates the overcloud nodes into different L2 + network segments, called racks. Each rack includes two leaves, some OCP + nodes and some EDPM nodes. +4. A separate provisioning network is necessary to install Openstack on those + nodes. +5. Once Openstack is installed on them, dataplane connectivity is achieved + using the BGP protocol. +6. Tests are executed from the OCP worker to verify external connectivity. + +## Stages + +All stages must be executed in the order listed below. Everything is required unless otherwise indicated. + +1. [Configure taints on the OCP worker](configure-taints.md) +2. [Install the OpenStack K8S operators and their dependencies](../../../common/) +3. [Apply metallb customization required to run a speaker pod on the OCP tester node](metallb/) +4. [Configuring networking and deploy the OpenStack control plane](control-plane.md) +5. [Configure and deploy the dataplane - networker and compute nodes](data-plane.md) diff --git a/examples/dt/bgp/bgp_dt03_ipv6/configure-taints.md b/examples/dt/bgp/bgp_dt03_ipv6/configure-taints.md new file mode 100644 index 000000000..5e24f6cc6 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/configure-taints.md @@ -0,0 +1,21 @@ +# Apply taints on OCP tester node + +This OCP worker node should not run any Openstack service apart from those +created by the test-operator. +It should also run a metallb's speaker pod, in order to obtain the proper +network configuration. +Due to this, taints should be configured on this worker. + +Execute the following command: +``` +oc patch node/worker-3 --type merge --patch ' + spec: + taints: + - effect: NoSchedule + key: testOperator + value: "true" + - effect: NoExecute + key: testOperator + value: "true" +' +``` diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane.md b/examples/dt/bgp/bgp_dt03_ipv6/control-plane.md new file mode 100644 index 000000000..e3cf95d4a --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane.md @@ -0,0 +1,57 @@ +# Configuring networking and deploy the OpenStack control plane + +## Assumptions + +- A storage class called `local-storage` should already exist. +- An infrastructure of spine/leaf routers exists, is properly connected to the + OCP nodes and the routers are configured to support BGP. + +## Initialize + +Switch to the "openstack" namespace +``` +oc project openstack +``` +Change to the bgp_dt01/control-plane directory +``` +cd architecture/examples/dt/bgp/bgp_dt01/control-plane +``` +Edit the [nncp/values.yaml](control-plane/nncp/values.yaml) and +[service-values.yaml](control-plane/service-values.yaml) files to suit +your environment. +``` +vi nncp/values.yaml +vi service-values.yaml +``` + +## Apply node network configuration + +Generate the node network configuration +``` +kustomize build nncp > nncp.yaml +``` +Apply the NNCP CRs +``` +oc apply -f nncp.yaml +``` +Wait for NNCPs to be available +``` +oc wait nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s +``` + +## Apply networking and control-plane configuration + +Generate the control-plane and networking CRs. +``` +kustomize build > control-plane.yaml +``` +Apply the CRs +``` +oc apply -f control-plane.yaml +``` + +Wait for control plane to be available +``` +oc wait osctlplane controlplane --for condition=Ready --timeout=600s +``` + diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/kustomization.yaml b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/kustomization.yaml new file mode 100644 index 000000000..8b160e25e --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/kustomization.yaml @@ -0,0 +1,293 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../dt/bgp/ + +resources: + - nncp/values.yaml + - service-values.yaml + - metallb_bgppeers.yaml + - ocp_networks_netattach.yaml + +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 + +patches: + # Add BGPPeer to BGPAdvertisement + - target: + kind: BGPAdvertisement + patch: |- + - op: add + path: /spec/peers/- + value: bgp-peer-node-3-0 + - op: add + path: /spec/peers/- + value: bgp-peer-node-3-1 + - op: add + path: /spec/peers/- + value: bgp-peer-node-4-0 + - op: add + path: /spec/peers/- + value: bgp-peer-node-4-1 + - op: add + path: /spec/peers/- + value: bgp-peer-node-5-0 + - op: add + path: /spec/peers/- + value: bgp-peer-node-5-1 + - op: add + path: /spec/peers/- + value: bgp-peer-node-6-0 + - target: + kind: NetworkAttachmentDefinition + labelSelector: "osp/net-attach-def-type=bgp" + path: ocp_network_template.yaml + +replacements: + # BGP peer IP addresses + # node3 + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.bgp_peers.0 + targets: + - select: + kind: BGPPeer + name: bgp-peer-node-3-0 + fieldPaths: + - spec.peerAddress + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.bgp_peers.1 + targets: + - select: + kind: BGPPeer + name: bgp-peer-node-3-1 + fieldPaths: + - spec.peerAddress + # node4 + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.bgp_peers.0 + targets: + - select: + kind: BGPPeer + name: bgp-peer-node-4-0 + fieldPaths: + - spec.peerAddress + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.bgp_peers.1 + targets: + - select: + kind: BGPPeer + name: bgp-peer-node-4-1 + fieldPaths: + - spec.peerAddress + # node5 + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.bgp_peers.0 + targets: + - select: + kind: BGPPeer + name: bgp-peer-node-5-0 + fieldPaths: + - spec.peerAddress + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.bgp_peers.1 + targets: + - select: + kind: BGPPeer + name: bgp-peer-node-5-1 + fieldPaths: + - spec.peerAddress + # node6 + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.bgp_peers.0 + targets: + - select: + kind: BGPPeer + name: bgp-peer-node-6-0 + fieldPaths: + - spec.peerAddress + # BGP NetworkAttachmentDefinition customization + - source: + kind: ConfigMap + name: network-values + fieldPath: data.bgp.net-attach-def.node6 + targets: + - select: + kind: NetworkAttachmentDefinition + name: bgpnet-worker-3 + fieldPaths: + - spec.config + # disable OCP workers as gateway nodes + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ovn.ovnController.external-ids + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ovn.template.ovnController.external-ids + options: + create: true + # configure neutron customServiceConfig + - source: + kind: ConfigMap + name: service-values + fieldPath: data.neutron.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.neutron.template.customServiceConfig + options: + create: true + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ironic.enabled + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.enabled + options: + create: true + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ironic.net-attach-def + targets: + - select: + kind: NetworkAttachmentDefinition + name: ironic + fieldPaths: + - spec.config + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ironic.rpcTransport + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.rpcTransport + options: + create: true + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ctlplane.endpoint_annotations + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicAPI.override.service.internal.metadata.annotations + options: + create: true + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ctlplane.endpoint_annotations + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicInspector.override.service.internal.metadata.annotations + options: + create: true + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.lbServiceType + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicAPI.override.service.internal.spec.type + - spec.ironic.template.ironicInspector.override.service.internal.spec.type + options: + create: true + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ironic.iface + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicConductors.0.networkAttachments.0 + - spec.ironic.template.ironicConductors.0.provisionNetwork + - spec.ironic.template.ironicInspector.inspectionNetwork + - spec.ironic.template.ironicInspector.networkAttachments.0 + - spec.ovn.template.ovnController.nicMappings.ironic + options: + create: true + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ironic.ironicConductors.0.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicConductors.0.customServiceConfig + options: + create: true + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ironic.ironicInspector.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ironic.template.ironicInspector.customServiceConfig + options: + create: true + + - source: + kind: ConfigMap + name: service-values + fieldPath: data.nova.cellTemplates + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.nova.template.cellTemplates + options: + create: true diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/metallb_bgppeers.yaml b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/metallb_bgppeers.yaml new file mode 100644 index 000000000..13f045c49 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/metallb_bgppeers.yaml @@ -0,0 +1,112 @@ +--- +apiVersion: metallb.io/v1beta2 +kind: BGPPeer +metadata: + name: bgp-peer-node-3-0 + namespace: metallb-system +spec: + myASN: 64999 + peerASN: 64999 + peerAddress: _replaced_ + password: f00barZ + nodeSelectors: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: ["worker-0"] +--- +apiVersion: metallb.io/v1beta2 +kind: BGPPeer +metadata: + name: bgp-peer-node-3-1 + namespace: metallb-system +spec: + myASN: 64999 + peerASN: 64999 + peerAddress: _replaced_ + password: f00barZ + nodeSelectors: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: ["worker-0"] +--- +apiVersion: metallb.io/v1beta2 +kind: BGPPeer +metadata: + name: bgp-peer-node-4-0 + namespace: metallb-system +spec: + myASN: 64999 + peerASN: 64999 + peerAddress: _replaced_ + password: f00barZ + nodeSelectors: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: ["worker-1"] +--- +apiVersion: metallb.io/v1beta2 +kind: BGPPeer +metadata: + name: bgp-peer-node-4-1 + namespace: metallb-system +spec: + myASN: 64999 + peerASN: 64999 + peerAddress: _replaced_ + password: f00barZ + nodeSelectors: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: ["worker-1"] +--- +apiVersion: metallb.io/v1beta2 +kind: BGPPeer +metadata: + name: bgp-peer-node-5-0 + namespace: metallb-system +spec: + myASN: 64999 + peerASN: 64999 + peerAddress: _replaced_ + password: f00barZ + nodeSelectors: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: ["worker-2"] +--- +apiVersion: metallb.io/v1beta2 +kind: BGPPeer +metadata: + name: bgp-peer-node-5-1 + namespace: metallb-system +spec: + myASN: 64999 + peerASN: 64999 + peerAddress: _replaced_ + password: f00barZ + nodeSelectors: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: ["worker-2"] +--- +apiVersion: metallb.io/v1beta2 +kind: BGPPeer +metadata: + name: bgp-peer-node-6-0 + namespace: metallb-system +spec: + myASN: 64999 + peerASN: 64999 + peerAddress: _replaced_ + password: f00barZ + nodeSelectors: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: ["worker-3"] # worker-3 has only one bgp-peer diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/.gitignore b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/.gitignore new file mode 100644 index 000000000..51ed8a956 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/.gitignore @@ -0,0 +1 @@ +nncp.yaml diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/kustomization.yaml b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/kustomization.yaml new file mode 100644 index 000000000..e0cb94608 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/kustomization.yaml @@ -0,0 +1,1120 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +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/nncp_ipv6 + +resources: + - values.yaml + - ocp_worker_nodes_nncp.yaml + +patches: + # Add BGP and octavia interfaces + - target: + kind: NodeNetworkConfigurationPolicy + patch: |- + - op: add + path: /spec/desiredState/interfaces/- + value: + description: BGP interface 1 + ipv4: + enabled: false + ipv6: + address: + - ip: _replaced_ + prefix-length: _replaced_ + enabled: true + mtu: 1500 + name: _replaced_ + state: up + type: ethernet + - target: + kind: NodeNetworkConfigurationPolicy + name: "master-.*" # node-6 does not need a second BGP interface + patch: |- + - op: add + path: /spec/desiredState/interfaces/- + value: + description: BGP interface 2 + ipv4: + enabled: false + ipv6: + address: + - ip: _replaced_ + prefix-length: _replaced_ + enabled: true + mtu: 1500 + name: _replaced_ + state: up + type: ethernet + - target: + kind: NodeNetworkConfigurationPolicy + name: "node-[3-5]" # node-6 does not need a second BGP interface + patch: |- + - op: add + path: /spec/desiredState/interfaces/- + value: + description: BGP interface 2 + ipv4: + enabled: false + ipv6: + address: + - ip: _replaced_ + prefix-length: _replaced_ + enabled: true + mtu: 1500 + name: _replaced_ + state: up + type: ethernet + - target: + kind: NodeNetworkConfigurationPolicy + patch: |- + - op: add + path: /spec/desiredState/interfaces/- + value: + description: loopback interface + ipv4: + address: + - ip: _replaced_ + prefix-length: _replaced_ + enabled: true + dhcp: false + ipv6: + address: + - ip: _replaced_ + prefix-length: _replaced_ + enabled: true + dhcp: false + name: _replaced_ + mtu: 65536 + state: up + - target: + kind: NodeNetworkConfigurationPolicy + patch: |- + - op: add + path: /spec/desiredState/interfaces/- + value: + description: Octavia vlan host interface + name: octavia + state: up + type: vlan + vlan: + base-iface: _replaced_ + id: _replaced_ + - target: + kind: NodeNetworkConfigurationPolicy + patch: |- + - op: add + path: /spec/desiredState/interfaces/- + value: + description: Octavia bridge + mtu: 1500 + name: octbr + type: linux-bridge + bridge: + options: + stp: + enabled: false + port: + - name: octavia + - target: + kind: NodeNetworkConfigurationPolicy + patch: |- + - op: add + path: /spec/desiredState/interfaces/- + value: + description: Ironic bridge + ipv6: + enabled: true + address: + - ip: _replaced_ + prefix-length: _replaced_ + ipv4: + enabled: false + mtu: 1500 + name: ironic + type: linux-bridge + bridge: + options: + stp: + enabled: false + port: + - name: _replaced_ + - target: + kind: NodeNetworkConfigurationPolicy + patch: |- + - op: add + path: /spec/desiredState/interfaces/- + value: + description: Ironic VRF + name: ironicvrf + type: vrf + state: up + vrf: + port: + - ironic + route-table-id: 10 + - target: + kind: NodeNetworkConfigurationPolicy + patch: |- + - op: add + path: /spec/desiredState/routes/config/- + value: + destination: "::/0" + metric: 150 + next-hop-address: _replaced_ + next-hop-interface: ironic + table-id: 10 + - op: add + path: /spec/desiredState/routes/config/- + value: + destination: _replaced_ + metric: 150 + next-hop-address: _replaced_ + next-hop-interface: ospbr + - op: add + path: /spec/desiredState/routes/config/- + value: + destination: "::/0" + metric: 150 + next-hop-address: _replaced_ + next-hop-interface: ospbr + + # Fix roles on masters + - target: + kind: NodeNetworkConfigurationPolicy + name: "master-.*" + patch: |- + - op: add + path: /spec/nodeSelector/node-role.kubernetes.io~1master + value: "" + - op: remove + path: /spec/nodeSelector/node-role.kubernetes.io~1worker + +replacements: + # Node names (workers) + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.name + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: node-3 + fieldPaths: + - metadata.name + - spec.nodeSelector.[kubernetes.io/hostname] + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.name + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: node-4 + fieldPaths: + - metadata.name + - spec.nodeSelector.[kubernetes.io/hostname] + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.name + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: node-5 + fieldPaths: + - metadata.name + - spec.nodeSelector.[kubernetes.io/hostname] + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.name + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: node-6 + fieldPaths: + - metadata.name + - spec.nodeSelector.[kubernetes.io/hostname] + + # Static Node IPs: node-3/worker-0 + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.internalapi_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.[name=internalapi].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.tenant_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.[name=tenant].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.ctlplane_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.[type=linux-bridge].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.storage_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.[name=storage].ipv6.address.0.ip + + # Static Node IPs: node-4 / worker-1 + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.internalapi_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.[name=internalapi].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.tenant_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.[name=tenant].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.ctlplane_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.[type=linux-bridge].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.storage_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.[name=storage].ipv6.address.0.ip + + # Static Node IPs: node-5 / worker-2 + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.internalapi_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.[name=internalapi].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.tenant_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.[name=tenant].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.ctlplane_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.[type=linux-bridge].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.storage_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.[name=storage].ipv6.address.0.ip + + # Static Node IPs: node-6 / worker-3 + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.internalapi_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.[name=internalapi].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.tenant_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.[name=tenant].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.ctlplane_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.[type=linux-bridge].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.storage_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.[name=storage].ipv6.address.0.ip + + + # prefix-lengths + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ctlplane.prefix-length + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.[type=linux-bridge].ipv6.address.0.prefix-length + - source: + kind: ConfigMap + name: network-values + fieldPath: data.internalapi.prefix-length + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.[name=internalapi].ipv6.address.0.prefix-length + - source: + kind: ConfigMap + name: network-values + fieldPath: data.tenant.prefix-length + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.[name=tenant].ipv6.address.0.prefix-length + - source: + kind: ConfigMap + name: network-values + fieldPath: data.storage.prefix-length + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.[name=storage].ipv6.address.0.prefix-length + + # BGP master-0/node-0 IPs + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_0.bgp_ip.0 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_0.bgp_ip.1 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.6.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_0.loopback_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_0.loopback_ipv6 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.ip + # BGP master-1/node-1 IPs + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_1.bgp_ip.0 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_1.bgp_ip.1 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.6.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_1.loopback_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_1.loopback_ipv6 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.ip + # BGP master-2/node-2 IPs + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_2.bgp_ip.0 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_2.bgp_ip.1 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.6.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_2.loopback_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_2.loopback_ipv6 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.ip + # BGP worker-0/node-3 IPs + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.bgp_ip.0 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.bgp_ip.1 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.6.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.loopback_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.loopback_ipv6 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.ip + # BGP worker-1/node-4 IPs + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.bgp_ip.0 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.bgp_ip.1 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.6.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.loopback_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.loopback_ipv6 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.ip + # BGP worker-2/node-5 IPs + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.bgp_ip.0 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.bgp_ip.1 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.6.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.loopback_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.loopback_ipv6 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.ip + # BGP worker-3/node-6 IPs + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.bgp_ip.0 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.loopback_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.6.ipv4.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.loopback_ipv6 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.6.ipv6.address.0.ip + + # BGP values + - source: + kind: ConfigMap + name: network-values + fieldPath: data.bgp.ifaces.0 + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.5.name + - source: + kind: ConfigMap + name: network-values + fieldPath: data.bgp.ifaces.1 + targets: # target all nodes except worker-3 (regexs do not seem to work on select.name value) + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.6.name + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.6.name + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.6.name + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.6.name + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.6.name + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.6.name + - source: + kind: ConfigMap + name: network-values + fieldPath: data.loopback.iface + targets: # regexs do not seem to work on select.name value + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.7.name + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.7.name + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.7.name + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.7.name + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.7.name + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.7.name + - select: # in case of worker-3, there is one less interfaces + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.6.name + - source: + kind: ConfigMap + name: network-values + fieldPath: data.bgp.prefix-length + targets: # regexs do not seem to work on select.name value + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.prefix-length + - spec.desiredState.interfaces.6.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.prefix-length + - spec.desiredState.interfaces.6.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.prefix-length + - spec.desiredState.interfaces.6.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.prefix-length + - spec.desiredState.interfaces.6.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.prefix-length + - spec.desiredState.interfaces.6.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.prefix-length + - spec.desiredState.interfaces.6.ipv6.address.0.prefix-length + - select: # in case of worker-3, there is one less interfaces + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.5.ipv6.address.0.prefix-length + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.loopback.prefix-length + targets: # regexs do not seem to work on select.name value + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.7.ipv4.address.0.prefix-length + - select: # in case of worker-3, there is one less interfaces + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.6.ipv4.address.0.prefix-length + - source: + kind: ConfigMap + name: network-values + fieldPath: data.loopback.prefix-length-ipv6 + targets: # regexs do not seem to work on select.name value + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.prefix-length + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.7.ipv6.address.0.prefix-length + - select: # in case of worker-3, there is one less interfaces + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.6.ipv6.address.0.prefix-length + # Ironic + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ironic.base_iface + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].bridge.port.0.name + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_0.ironic_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-0 + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_1.ironic_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-1 + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_2.ironic_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: master-2 + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_3.ironic_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-0 + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_4.ironic_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-1 + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_5.ironic_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-2 + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.ironic_ip + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].ipv6.address.0.ip + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ironic.prefix-length + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.[name=ironic].ipv6.address.0.prefix-length + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ironic.gateway + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.routes.config.0.next-hop-address + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ctlplane.subnets.0.gateway + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.routes.config.1.next-hop-address + - spec.desiredState.routes.config.2.next-hop-address + - source: + kind: ConfigMap + name: network-values + fieldPath: data.ironic.cidr + targets: + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.routes.config.1.destination + # Octavia + - source: + kind: ConfigMap + name: network-values + fieldPath: data.octavia.base_iface + targets: # octavia interfaces are needed on the workers, except worker-3 + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.[name=octavia].vlan.base-iface + + - source: + kind: ConfigMap + name: network-values + fieldPath: data.octavia.vlan + targets: # octavia interfaces are needed on the workers, except worker-3 + - select: + kind: NodeNetworkConfigurationPolicy + fieldPaths: + - spec.desiredState.interfaces.[name=octavia].vlan.id + # Overwrite worker-3 base interface + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.base_if + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.interfaces.[name=internalapi].vlan.base-iface + - spec.desiredState.interfaces.[name=tenant].vlan.base-iface + - spec.desiredState.interfaces.[name=storage].vlan.base-iface + - spec.desiredState.interfaces.[description=^ctlplane.*].name + - spec.desiredState.interfaces.[description=^linux-bridge.*].bridge.port.0.name + - spec.desiredState.interfaces.[name=octavia].vlan.base-iface + # Overwrite worker-3 base routes + - source: + kind: ConfigMap + name: network-values + fieldPath: data.node_6.routes + targets: + - select: + kind: NodeNetworkConfigurationPolicy + name: worker-3 + fieldPaths: + - spec.desiredState.routes diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/ocp_worker_nodes_nncp.yaml b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/ocp_worker_nodes_nncp.yaml new file mode 100644 index 000000000..c73f57aa7 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/ocp_worker_nodes_nncp.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: nmstate.io/v1 +kind: NodeNetworkConfigurationPolicy +metadata: + name: node-3 + labels: + osp/nncm-config-type: standard +--- +apiVersion: nmstate.io/v1 +kind: NodeNetworkConfigurationPolicy +metadata: + name: node-4 + labels: + osp/nncm-config-type: standard +--- +apiVersion: nmstate.io/v1 +kind: NodeNetworkConfigurationPolicy +metadata: + name: node-5 + labels: + osp/nncm-config-type: standard +--- +apiVersion: nmstate.io/v1 +kind: NodeNetworkConfigurationPolicy +metadata: + name: node-6 + labels: + osp/nncm-config-type: standard diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/values.yaml b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/values.yaml new file mode 100644 index 000000000..b50857e5d --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp/values.yaml @@ -0,0 +1,524 @@ +--- +# local-config: referenced, but not emitted by kustomize +apiVersion: v1 +kind: ConfigMap +metadata: + name: network-values + annotations: + config.kubernetes.io/local-config: "true" +data: + # nodes + node_0: + name: master-0 + node_name: master-0 + internalapi_ip: "2620:cf:cf:bbbb::10" + tenant_ip: "2620:cf:cf:eeee::10" + ctlplane_ip: "2620:cf:cf:aaaa::10" + storage_ip: "2620:cf:cf:cccc::10" + ironic_ip: "2620:cf:cf:ffff::10" + bgp_ip: + - "2620:cf::100:64:0:10" + - "2620:cf::100:65:0:10" + bgp_peers: + - "2620:cf::100:64:0:9" + - "2620:cf::100:65:0:9" + loopback_ip: 172.30.0.3 + loopback_ipv6: f00d:f00d:f00d:f00d:172:30:0:3 + node_1: + name: master-1 + node_name: master-1 + internalapi_ip: "2620:cf:cf:bbbb::11" + tenant_ip: "2620:cf:cf:eeee::11" + ctlplane_ip: "2620:cf:cf:aaaa::11" + storage_ip: "2620:cf:cf:cccc::11" + ironic_ip: "2620:cf:cf:ffff::11" + bgp_ip: + - "2620:cf::100:64:1:10" + - "2620:cf::100:65:1:10" + bgp_peers: + - "2620:cf::100:64:1:9" + - "2620:cf::100:65:1:9" + loopback_ip: 172.30.1.3 + loopback_ipv6: f00d:f00d:f00d:f00d:172:30:1:3 + node_2: + name: master-2 + node_name: master-2 + internalapi_ip: "2620:cf:cf:bbbb::12" + tenant_ip: "2620:cf:cf:eeee::12" + ctlplane_ip: "2620:cf:cf:aaaa::12" + storage_ip: "2620:cf:cf:cccc::12" + ironic_ip: "2620:cf:cf:ffff::12" + bgp_ip: + - "2620:cf::100:64:2:10" + - "2620:cf::100:65:2:10" + bgp_peers: + - "2620:cf::100:64:2:9" + - "2620:cf::100:65:2:9" + loopback_ip: 172.30.2.3 + loopback_ipv6: f00d:f00d:f00d:f00d:172:30:2:3 + node_3: + name: worker-0 + node_name: worker-0 + internalapi_ip: "2620:cf:cf:bbbb::13" + tenant_ip: "2620:cf:cf:eeee::13" + ctlplane_ip: "2620:cf:cf:aaaa::13" + storage_ip: "2620:cf:cf:cccc::13" + ironic_ip: "2620:cf:cf:ffff::13" + bgp_ip: + - "2620:cf::100:64:0:14" + - "2620:cf::100:65:0:14" + bgp_peers: + - "2620:cf::100:64:0:13" + - "2620:cf::100:65:0:13" + loopback_ip: 172.30.0.4 + loopback_ipv6: f00d:f00d:f00d:f00d:172:30:0:4 + node_4: + name: worker-1 + node_name: worker-1 + internalapi_ip: "2620:cf:cf:bbbb::14" + tenant_ip: "2620:cf:cf:eeee::14" + ctlplane_ip: "2620:cf:cf:aaaa::14" + storage_ip: "2620:cf:cf:cccc::14" + ironic_ip: "2620:cf:cf:ffff::14" + bgp_ip: + - "2620:cf::100:64:1:14" + - "2620:cf::100:65:1:14" + bgp_peers: + - "2620:cf::100:64:1:13" + - "2620:cf::100:65:1:13" + loopback_ip: 172.30.1.4 + loopback_ipv6: f00d:f00d:f00d:f00d:172:30:1:4 + node_5: + name: worker-2 + node_name: worker-2 + internalapi_ip: "2620:cf:cf:bbbb::15" + tenant_ip: "2620:cf:cf:eeee::15" + ctlplane_ip: "2620:cf:cf:aaaa::15" + storage_ip: "2620:cf:cf:cccc::15" + ironic_ip: "2620:cf:cf:ffff::15" + bgp_ip: + - "2620:cf::100:64:2:14" + - "2620:cf::100:65:2:14" + bgp_peers: + - "2620:cf::100:64:2:13" + - "2620:cf::100:65:2:13" + loopback_ip: 172.30.2.4 + loopback_ipv6: f00d:f00d:f00d:f00d:172:30:2:4 + node_6: + name: worker-3 + node_name: worker-3 + internalapi_ip: "2620:cf:cf:bbbb::16" + tenant_ip: "2620:cf:cf:eeee::16" + ctlplane_ip: "2620:cf:cf:aaaa::16" + storage_ip: "2620:cf:cf:cccc::16" + ironic_ip: "2620:cf:cf:ffff::16" + bgp_ip: + - "2620:cf::100:64:10:2" + bgp_peers: + - "2620:cf::100:64:10:1" + loopback_ip: 172.30.10.2 + loopback_ipv6: f00d:f00d:f00d:f00d:172:30:10:2 + base_if: enp7s0 + routes: # TODO-edu + config: + - destination: 192.168.133.0/24 + next-hop-address: 100.64.6.9 + next-hop-interface: enp8s0 + + # networks + ctlplane: + dnsDomain: ctlplane.example.com + subnets: + - allocationRanges: + - end: "2620:cf:cf:aaaa::120" + start: "2620:cf:cf:aaaa::100" + - end: "2620:cf:cf:aaaa::200" + start: "2620:cf:cf:aaaa::150" + cidr: "2620:cf:cf:aaaa::0/64" + gateway: "2620:cf:cf:aaaa::1" + name: subnet1 + prefix-length: 64 + iface: enp7s0 + mtu: 9000 + lb_addresses: + - "2620:cf:cf:aaaa::80-2620:cf:cf:aaaa::90" + endpoint_annotations: + metallb.universe.tf/address-pool: ctlplane + metallb.universe.tf/allow-shared-ip: ctlplane + metallb.universe.tf/loadBalancerIPs: "2620:cf:cf:aaaa::80" + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "ctlplane", + "type": "macvlan", + "master": "ospbr", + "ipam": { + "type": "whereabouts", + "range": "2620:cf:cf:aaaa::0/64", + "range_start": "2620:cf:cf:aaaa::30", + "range_end": "2620:cf:cf:aaaa::70" + } + } + internalapi: + dnsDomain: internalapi.example.com + subnets: + - allocationRanges: + - end: "2620:cf:cf:bbbb::250" + start: "2620:cf:cf:bbbb::100" + cidr: "2620:cf:cf:bbbb::0/64" + name: subnet1 + vlan: 20 + mtu: 1500 + prefix-length: 64 + iface: internalapi + vlan: 20 + base_iface: enp7s0 + lb_addresses: + - "2620:cf:cf:bbbb::80-2620:cf:cf:bbbb::90" + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: "2620:cf:cf:bbbb::80" + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "internalapi", + "type": "macvlan", + "master": "internalapi", + "ipam": { + "type": "whereabouts", + "range": "2620:cf:cf:bbbb::0/64", + "range_start": "2620:cf:cf:bbbb::30", + "range_end": "2620:cf:cf:bbbb::70" + } + } + storage: + dnsDomain: storage.example.com + subnets: + - allocationRanges: + - end: "2620:cf:cf:cccc::250" + start: "2620:cf:cf:cccc::100" + cidr: "2620:cf:cf:cccc::0/64" + name: subnet1 + vlan: 21 + mtu: 9000 + prefix-length: 64 + iface: storage + vlan: 21 + base_iface: enp7s0 + lb_addresses: + - "2620:cf:cf:cccc::80-2620:cf:cf:cccc::90" + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "storage", + "type": "macvlan", + "master": "storage", + "ipam": { + "type": "whereabouts", + "range": "2620:cf:cf:cccc::0/64", + "range_start": "2620:cf:cf:cccc::30", + "range_end": "2620:cf:cf:cccc::70" + } + } + tenant: + dnsDomain: tenant.example.com + subnets: + - allocationRanges: + - end: "2620:cf:cf:eeee::250" + start: "2620:cf:cf:eeee::100" + cidr: "2620:cf:cf:eeee::0/64" + name: subnet1 + vlan: 22 + mtu: 1500 + prefix-length: 64 + iface: tenant + vlan: 22 + base_iface: enp7s0 + lb_addresses: + - "2620:cf:cf:eeee::80-2620:cf:cf:eeee::90" + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "tenant", + "type": "macvlan", + "master": "tenant", + "ipam": { + "type": "whereabouts", + "range": "2620:cf:cf:eeee::0/64", + "range_start": "2620:cf:cf:eeee::30", + "range_end": "2620:cf:cf:eeee::70" + } + } + octavia: # TODO-edu - change to ipv6 + dnsDomain: octavia.openstack.lab + mtu: 1500 + vlan: 23 + base_iface: enp7s0 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "octavia", + "type": "bridge", + "bridge": "octbr", + "ipam": { + "type": "whereabouts", + "range": "172.23.0.0/24", + "range_start": "172.23.0.30", + "range_end": "172.23.0.70", + "routes": [ + { + "dst": "172.24.0.0/16", + "gw": "172.23.0.150" + } + ] + } + } + external: + dnsDomain: external.example.com + subnets: + - allocationRanges: + - end: "2620:cf:cf:cf::250" + start: "2620:cf:cf:cf::100" + cidr: "2620:cf:cf:cf::/64" + gateway: "2620:cf:cf:cf::1" + name: subnet1 + mtu: 1500 + ironic: + bridgeName: ironic + cidr: '2620:cf:cf:ffff::0/64' + mtu: 1500 + prefix-length: 64 + iface: ironic + base_iface: enp10s0 + gateway: '2620:cf:cf:ffff::1' + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "ironic", + "type": "macvlan", + "master": "ironic", + "ipam": { + "type": "whereabouts", + "range": "2620:cf:cf:ffff::0/64", + "range_start": "2620:cf:cf:ffff::30", + "range_end": "2620:cf:cf:ffff::70" + } + } + + bgp: + prefix-length: 30 + ifaces: + - enp8s0 + - enp9s0 + asn: 64999 + peer_asn: 64999 + subnets: + bgpnet0: + - name: subnet0 + allocationRanges: + - end: 100.64.0.6 + start: 100.64.0.1 + cidr: 100.64.0.0/29 + gateway: 100.64.0.1 + routes: + - destination: 0.0.0.0/0 + nexthop: 100.64.0.1 + - name: subnet1 + allocationRanges: + - end: 100.64.1.6 + start: 100.64.1.1 + cidr: 100.64.1.0/29 + gateway: 100.64.1.1 + routes: + - destination: 0.0.0.0/0 + nexthop: 100.64.1.1 + - name: subnet2 + allocationRanges: + - end: 100.64.2.6 + start: 100.64.2.1 + cidr: 100.64.2.0/29 + gateway: 100.64.2.1 + routes: + - destination: 0.0.0.0/0 + nexthop: 100.64.2.1 + bgpnet1: + - name: subnet0 + allocationRanges: + - end: 100.65.0.6 + start: 100.65.0.1 + cidr: 100.65.0.0/29 + gateway: 100.65.0.1 + routes: + - destination: 0.0.0.0/0 + nexthop: 100.65.0.1 + - name: subnet1 + allocationRanges: + - end: 100.65.1.6 + start: 100.65.1.1 + cidr: 100.65.1.0/29 + gateway: 100.65.1.1 + routes: + - destination: 0.0.0.0/0 + nexthop: 100.65.1.1 + - name: subnet2 + allocationRanges: + - end: 100.65.2.6 + start: 100.65.2.1 + cidr: 100.65.2.0/29 + gateway: 100.65.2.1 + routes: + - destination: 0.0.0.0/0 + nexthop: 100.65.2.1 + bgpmainnet: + - name: subnet0 + cidr: 172.30.0.0/28 + allocationRanges: + - end: 172.30.0.14 + start: 172.30.0.2 + - name: subnet1 + cidr: 172.30.1.0/28 + allocationRanges: + - end: 172.30.1.14 + start: 172.30.1.2 + - name: subnet2 + cidr: 172.30.2.0/28 + allocationRanges: + - end: 172.30.2.14 + start: 172.30.2.2 + - name: subnet10 + cidr: 172.30.10.0/28 + allocationRanges: + - end: 172.30.10.14 + start: 172.30.10.2 + bgpmainnetv6: + - name: subnet0 + cidr: f00d:f00d:f00d:f00d:f00d:f00d:f00d:0010/124 + allocationRanges: + - end: f00d:f00d:f00d:f00d:f00d:f00d:f00d:001e + start: f00d:f00d:f00d:f00d:f00d:f00d:f00d:0012 + - name: subnet1 + cidr: f00d:f00d:f00d:f00d:f00d:f00d:f00d:0020/124 + allocationRanges: + - end: f00d:f00d:f00d:f00d:f00d:f00d:f00d:002e + start: f00d:f00d:f00d:f00d:f00d:f00d:f00d:0022 + - name: subnet2 + cidr: f00d:f00d:f00d:f00d:f00d:f00d:f00d:0030/124 + allocationRanges: + - end: f00d:f00d:f00d:f00d:f00d:f00d:f00d:003e + start: f00d:f00d:f00d:f00d:f00d:f00d:f00d:0032 + - name: subnet3 + cidr: f00d:f00d:f00d:f00d:f00d:f00d:f00d:0040/124 + allocationRanges: + - end: f00d:f00d:f00d:f00d:f00d:f00d:f00d:004e + start: f00d:f00d:f00d:f00d:f00d:f00d:f00d:0042 + bgpdefs: + node0: + bgpnet0: + bgp_peer: 100.64.0.9 + bgp_ip: 100.64.0.10 + bgpnet1: + bgp_peer: 100.65.0.9 + bgp_ip: 100.65.0.10 + node1: + bgpnet0: + bgp_peer: 100.64.1.9 + bgp_ip: 100.64.1.10 + bgpnet1: + bgp_peer: 100.65.1.9 + bgp_ip: 100.65.1.10 + node2: + bgpnet0: + bgp_peer: 100.64.2.9 + bgp_ip: 100.64.2.10 + bgpnet1: + bgp_peer: 100.65.2.9 + bgp_ip: 100.65.2.10 + node3: + bgpnet0: + bgp_peer: 100.64.0.13 + bgp_ip: 100.64.0.14 + bgpnet1: + bgp_peer: 100.65.0.13 + bgp_ip: 100.65.0.14 + node4: + bgpnet0: + bgp_peer: 100.64.1.13 + bgp_ip: 100.64.1.14 + bgpnet1: + bgp_peer: 100.65.1.13 + bgp_ip: 100.65.1.14 + node5: + bgpnet0: + bgp_peer: 100.64.2.13 + bgp_ip: 100.64.2.14 + bgpnet1: + bgp_peer: 100.65.2.13 + bgp_ip: 100.65.2.14 + node6: + bgpnet0: + bgp_peer: 100.64.10.1 + bgp_ip: 100.64.10.2 + routes: + config: + - destination: 192.168.133.0/24 + next-hop-address: 100.64.10.1 + next-hop-interface: enp8s0 + net-attach-def: + node6: | + { + "cniVersion": "0.3.1", + "name": "bgpnet-worker-3", + "type": "host-device", + "device": "enp8s0", + "ipam": { + "type": "whereabouts", + "range": "100.64.10.0/30", + "range_start": "100.64.10.2", + "range_end": "100.64.10.2", + "routes": [{ + "dst": "192.168.133.0/24", + "gw": "100.64.10.1" + }] + } + } + + loopback: + prefix-length: 32 + prefix-length-ipv6: 128 + iface: lo + datacentre: + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "datacentre", + "type": "bridge", + "bridge": "ospbr", + "ipam": {} + } + + dns-resolver: + config: + server: + - "2620:cf:cf:aaaa::1" + search: [] + options: + - key: server + values: + - "2620:cf:cf:aaaa::1" + + routes: + config: [] + + rabbitmq: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: "2620:cf:cf:bbbb::81" + rabbitmq-cell1: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: "2620:cf:cf:bbbb::82" + + lbServiceType: LoadBalancer + storageClass: local-storage + bridgeName: ospbr diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/ocp_network_template.yaml b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/ocp_network_template.yaml new file mode 100644 index 000000000..29f6deaf6 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/ocp_network_template.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: nmstate.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: _ignored_ +spec: + config: | + _replaced_ diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/ocp_networks_netattach.yaml b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/ocp_networks_netattach.yaml new file mode 100644 index 000000000..ac8070a24 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/ocp_networks_netattach.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: bgpnet-worker-3 + labels: + osp/net: bgpnet-worker-3 + osp/net-attach-def-type: bgp +--- +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: ironic + labels: + osp/net: ironic + osp/net-attach-def-type: standard +spec: + config: | + _replaced_ diff --git a/examples/dt/bgp/bgp_dt03_ipv6/control-plane/service-values.yaml b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/service-values.yaml new file mode 100644 index 000000000..c946f456d --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/control-plane/service-values.yaml @@ -0,0 +1,97 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: service-values + annotations: + config.kubernetes.io/local-config: "true" +data: + preserveJobs: false + glance: + customServiceConfig: | + [DEFAULT] + enabled_backends = default_backend:swift + [glance_store] + default_backend = default_backend + [default_backend] + swift_store_create_container_on_put = True + swift_store_auth_version = 3 + swift_store_auth_address = {{ .KeystoneInternalURL }} + swift_store_endpoint_type = internalURL + swift_store_user = service:glance + swift_store_key = {{ .ServicePassword }} + default: + replicas: 1 + + swift: + enabled: true + + octavia: + enabled: false + amphoraImageContainerImage: quay.io/gthiemonge/octavia-amphora-image + apacheContainerImage: registry.redhat.io/ubi9/httpd-24:latest + octaviaAPI: + networkAttachments: + - internalapi + octaviaHousekeeping: + networkAttachments: + - octavia + octaviaHealthManager: + networkAttachments: + - octavia + octaviaWorker: + networkAttachments: + - octavia + + ovn: + ovnController: + nicMappings: + datacentre: ocpbr + octavia: octbr + ironic: ironic + external-ids: + enable-chassis-as-gateway: false + neutron: + customServiceConfig: | + [DEFAULT] + vlan_transparent = true + debug = true + [ovs] + igmp_snooping_enable = true + + ironic: + enabled: true + rpcTransport: oslo + ironicConductors: + - customServiceConfig: | + [pxe] + kernel_append_params = console=ttyS0 + + [neutron] + cleaning_network = provisioning + provisioning_network = provisioning + rescuing_network = provisioning + inspection_network = provisioning + ironicInspector: + customServiceConfig: | + [capabilities] + boot_mode = true + + [processing] + update_pxe_enabled = false + + nova: + cellTemplates: + cell0: + cellDatabaseInstance: openstack + cellDatabaseAccount: nova-cell0 + cellMessageBusInstance: rabbitmq + hasAPIAccess: true + cell1: + cellDatabaseInstance: openstack-cell1 + cellDatabaseAccount: nova-cell1 + cellMessageBusInstance: rabbitmq-cell1 + hasAPIAccess: true + novaComputeTemplates: + compute-ironic: + computeDriver: ironic.IronicDriver diff --git a/examples/dt/bgp/bgp_dt03_ipv6/data-plane.md b/examples/dt/bgp/bgp_dt03_ipv6/data-plane.md new file mode 100644 index 000000000..58cc59956 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/data-plane.md @@ -0,0 +1,74 @@ +# Configuring and deploying the dataplane - networker and compute nodes + +## Assumptions + +- The [control plane](control-plane.md) has been created and successfully deployed +- An infrastructure of spine/leaf routers exists, is properly connected to the + pre-provisioned EDPM nodes and the routers are configured to support BGP. + +## Initialize + +Switch to the "openstack" namespace +``` +oc project openstack +``` +Change to the bgp_dt01/ directory +``` +cd architecture/examples/dt/bgp/bgp_dt01/ +``` +Edit the [edpm/networkers/values.yaml](edpm/networkers/values.yaml) file to suit +your environment. +``` +vi values.yaml +``` +Edit the [edpm/computes/values.yaml](edpm/computes/values.yaml) file to suit +your environment. +``` +vi values.yaml +``` + +## Create Networker and Compute Nodeset CRs + +Generate the networkers dataplane nodeset CR. +``` +kustomize build edpm/networkers > edpm-networker-nodeset.yaml +``` +Generate the computes dataplane nodeset CR. +``` +kustomize build edpm/computes > edpm-compute-nodeset.yaml +``` + +## Create EDPM Deployment CR +Generate the dataplane deployment CR. +``` +kustomize build edpm/deployment > edpm-deployment.yaml +``` + +## Apply the Nodeset CRs + +Apply the Networker nodeset CR +``` +oc apply -f edpm-networker-nodeset.yaml +``` +Wait for Networker dataplane nodeset setup to finish +``` +oc wait osdpns networker-nodes --for condition=SetupReady --timeout=600s +``` +Apply the Compute nodeset CR +``` +oc apply -f edpm-compute-nodeset.yaml +``` +Wait for Compute dataplane nodeset setup to finish +``` +oc wait osdpns compute-nodes --for condition=SetupReady --timeout=600s +``` + +## Apply the deployment +Start the deployment +``` +oc apply -f edpm-deployment.yaml +``` +Wait for dataplane deployment to finish +``` +oc wait osdpd edpm-deployment --for condition=Ready --timeout=2400s +``` diff --git a/examples/dt/bgp/bgp_dt03_ipv6/edpm/computes/kustomization.yaml b/examples/dt/bgp/bgp_dt03_ipv6/edpm/computes/kustomization.yaml new file mode 100644 index 000000000..9354460e1 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/edpm/computes/kustomization.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/bgp/edpm/nodeset + ## It's possible to replace ../../../../../../dt/bgp/edpm/nodeset with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - values.yaml + +patches: + - target: + kind: OpenStackDataPlaneNodeSet + name: .* + patch: |- + - op: replace + path: /metadata/name + value: compute-nodes diff --git a/examples/dt/bgp/bgp_dt03_ipv6/edpm/computes/values.yaml b/examples/dt/bgp/bgp_dt03_ipv6/edpm/computes/values.yaml new file mode 100644 index 000000000..035d7172f --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/edpm/computes/values.yaml @@ -0,0 +1,261 @@ +# yamllint disable rule:line-length +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: edpm-nodeset-values + annotations: + config.kubernetes.io/local-config: "true" +data: + ssh_keys: + # Authorized keys that will have access to the dataplane computes via SSH + authorized: CHANGEME + # The private key that will have access to the dataplane computes via SSH + private: CHANGEME2 + # The public key that will have access to the dataplane computes via SSH + public: CHANGEME3 + nodeset: + ansible: + ansibleUser: cloud-admin + ansiblePort: 22 + ansibleVars: + edpm_ovn_encap_ip: "{{ lookup('vars', 'bgpmainnet_ip') }}" + edpm_ovn_bgp_agent_expose_tenant_networks: false + edpm_frr_bgp_ipv4_src_network: bgpmainnet + edpm_frr_bgp_ipv6_src_network: bgpmainnetv6 + edpm_frr_bgp_neighbor_password: f00barZ + edpm_frr_bgp_uplinks: + - nic3 + - nic4 + timesync_ntp_servers: + - hostname: pool.ntp.org + # conntrack is necessary for some tobiko tests + edpm_bootstrap_command: | + dnf -y install conntrack-tools + edpm_network_config_hide_sensitive_logs: false + edpm_network_config_os_net_config_mappings: + edpm-compute-0: + nic2: 6a:fe:54:3f:8a:02 # CHANGEME + edpm-compute-1: + nic2: 6b:fe:54:3f:8a:02 # CHANGEME + edpm-compute-2: + nic2: 6c:fe:54:3f:8a:02 # CHANGEME + edpm_network_config_template: | + --- + {% set mtu_list = [ctlplane_mtu] %} + {% for network in nodeset_networks %} + {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} + {%- endfor %} + {% set min_viable_mtu = mtu_list | max %} + network_config: + - type: ovs_bridge + name: {{ neutron_physical_bridge_name }} + use_dhcp: false + dns_servers: {{ ctlplane_dns_nameservers }} + domain: {{ dns_search_domains }} + addresses: + - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} + routes: [] + members: + - type: interface + name: nic2 + mtu: {{ min_viable_mtu }} + # force the MAC address of the bridge to this interface + primary: true + {% for network in nodeset_networks %} + {% if not network.lower().startswith('bgp') %} + - type: vlan + mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} + vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} + addresses: + - ip_netmask: >- + {{ + lookup('vars', networks_lower[network] ~ '_ip') + }}/{{ + lookup('vars', networks_lower[network] ~ '_cidr') + }} + routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} + {% endif %} + {% endfor %} + - type: interface + name: nic3 + use_dhcp: false + addresses: + - ip_netmask: {{ lookup('vars', 'bgpnet0_ip') }}/30 + - type: interface + name: nic4 + use_dhcp: false + addresses: + - ip_netmask: {{ lookup('vars', 'bgpnet1_ip') }}/30 + - type: interface + name: lo + addresses: + - ip_netmask: {{ lookup('vars', 'bgpmainnet_ip') }}/32 + - ip_netmask: {{ lookup('vars', 'bgpmainnetv6_ip') }}/128 + edpm_nodes_validation_validate_controllers_icmp: false + edpm_nodes_validation_validate_gateway_icmp: false + edpm_sshd_allowed_ranges: + - '2620:cf:cf:aaaa::0/64' + edpm_sshd_configure_firewall: true + gather_facts: false + neutron_physical_bridge_name: br-ex + neutron_public_interface_name: eth1 + networks: + - defaultRoute: true + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + - name: BgpNet0 + subnetName: subnet0 + - name: BgpNet1 + subnetName: subnet0 + - name: BgpMainNet + subnetName: subnet0 + - name: BgpMainNetV6 + subnetName: subnet0 + - name: BgpNet0 + subnetName: subnet1 + - name: BgpNet1 + subnetName: subnet1 + - name: BgpMainNet + subnetName: subnet1 + - name: BgpMainNetV6 + subnetName: subnet1 + - name: BgpNet0 + subnetName: subnet2 + - name: BgpNet1 + subnetName: subnet2 + - name: BgpMainNet + subnetName: subnet2 + - name: BgpMainNetV6 + subnetName: subnet2 + nodes: + edpm-compute-0: + hostName: edpm-compute-0 + ansible: + ansibleHost: '2620:cf:cf:aaaa::100' + ansibleVars: + edpm_ovn_bgp_agent_local_ovn_peer_ips: + - "2620:cf::100:64:0:1" + - "2620:cf::100:65:0:1" + edpm_frr_bgp_peers: + - "2620:cf::100:64:0:1" + - "2620:cf::100:65:0:1" + networks: + - defaultRoute: true + fixedIP: '2620:cf:cf:aaaa::100' + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + - name: Bgpnet0 + subnetName: subnet0 + fixedIP: "2620:cf::100:64:0:2" + - name: Bgpnet1 + subnetName: subnet0 + fixedIP: "2620:cf::100:65:0:2" + - name: Bgpmainnet + subnetName: subnet1 + fixedIP: 172.30.0.1 + - name: BgpmainnetV6 + subnetName: subnet1 + fixedIP: f00d:f00d:f00d:f00d:172:30:0:1 + edpm-compute-1: + hostName: edpm-compute-1 + ansible: + ansibleHost: '2620:cf:cf:aaaa::101' + ansibleVars: + edpm_ovn_bgp_agent_local_ovn_peer_ips: + - "2620:cf::100:64:1:1" + - "2620:cf::100:65:1:1" + edpm_frr_bgp_peers: + - "2620:cf::100:64:1:1" + - "2620:cf::100:65:1:1" + networks: + - defaultRoute: true + fixedIP: '2620:cf:cf:aaaa::101' + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + - name: Bgpnet0 + subnetName: subnet1 + fixedIP: "2620:cf::100:64:1:2" + - name: Bgpnet1 + subnetName: subnet1 + fixedIP: "2620:cf::100:65:1:2" + - name: Bgpmainnet + subnetName: subnet1 + fixedIP: 172.30.1.1 + - name: BgpmainnetV6 + subnetName: subnet1 + fixedIP: f00d:f00d:f00d:f00d:172:30:1:1 + edpm-compute-2: + hostName: edpm-compute-2 + ansible: + ansibleHost: '2620:cf:cf:aaaa::102' + ansibleVars: + edpm_ovn_bgp_agent_local_ovn_peer_ips: + - "2620:cf::100:64:2:1" + - "2620:cf::100:65:2:1" + edpm_frr_bgp_peers: + - "2620:cf::100:64:2:1" + - "2620:cf::100:65:2:1" + networks: + - defaultRoute: true + fixedIP: '2620:cf:cf:aaaa::102' + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + - name: Bgpnet0 + subnetName: subnet2 + fixedIP: "2620:cf::100:64:2:2" + - name: Bgpnet1 + subnetName: subnet2 + fixedIP: "2620:cf::100:65:2:2" + - name: Bgpmainnet + subnetName: subnet1 + fixedIP: 172.30.2.1 + - name: BgpmainnetV6 + subnetName: subnet1 + fixedIP: f00d:f00d:f00d:f00d:172:30:2:1 + services: + - download-cache + - bootstrap + - configure-network + - validate-network + - frr + - install-os + - configure-os + - run-os + - reboot-os + - install-certs + - ovn + - neutron-metadata + - ovn-bgp-agent + - libvirt + - nova + nova: + migration: + ssh_keys: + private: CHANGEME4 + public: CHANGEME5 diff --git a/examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment/kustomization.yaml b/examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment/kustomization.yaml new file mode 100644 index 000000000..6d62a92bf --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment/kustomization.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/bgp/edpm/deployment + ## It's possible to replace ../../../../../../dt/bgp/edpm/deployment/ with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - values.yaml + +replacements: + - source: + kind: ConfigMap + name: edpm-deployment-values + fieldPath: data.nodeSets + targets: + - select: + kind: OpenStackDataPlaneDeployment + fieldPaths: + - spec.nodeSets diff --git a/examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment/values.yaml b/examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment/values.yaml new file mode 100644 index 000000000..9fcb60ac5 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment/values.yaml @@ -0,0 +1,12 @@ +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: edpm-deployment-values + annotations: + config.kubernetes.io/local-config: "true" +data: + nodeSets: + - networker-nodes + - compute-nodes diff --git a/examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers/kustomization.yaml b/examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers/kustomization.yaml new file mode 100644 index 000000000..3008055c8 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers/kustomization.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/bgp/edpm/nodeset + ## It's possible to replace ../../../../../../dt/bgp/edpm/nodeset with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - values.yaml + +patches: + - target: + kind: OpenStackDataPlaneNodeSet + name: .* + patch: |- + - op: replace + path: /metadata/name + value: networker-nodes + + - target: + kind: Secret + name: nova-migration-ssh-key + patch: |- + - op: add + path: /metadata/annotations + value: + config.kubernetes.io/local-config: true diff --git a/examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers/values.yaml b/examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers/values.yaml new file mode 100644 index 000000000..1711e7d07 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers/values.yaml @@ -0,0 +1,261 @@ +# yamllint disable rule:line-length +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: edpm-nodeset-values + annotations: + config.kubernetes.io/local-config: "true" +data: + ssh_keys: + # Authorized keys that will have access to the dataplane computes via SSH + authorized: CHANGEME + # The private key that will have access to the dataplane computes via SSH + private: CHANGEME2 + # The public key that will have access to the dataplane computes via SSH + public: CHANGEME3 + nodeset: + ansible: + ansibleUser: cloud-admin + ansiblePort: 22 + ansibleVars: + edpm_ovn_encap_ip: "{{ lookup('vars', 'bgpmainnet_ip') }}" + edpm_ovn_bgp_agent_expose_tenant_networks: false + edpm_frr_bgp_ipv4_src_network: bgpmainnet + edpm_frr_bgp_ipv6_src_network: bgpmainnetv6 + edpm_frr_bgp_neighbor_password: f00barZ + edpm_frr_bgp_uplinks: + - nic3 + - nic4 + timesync_ntp_servers: + - hostname: pool.ntp.org + # conntrack is necessary for some tobiko tests + edpm_bootstrap_command: | + dnf -y install conntrack-tools + edpm_network_config_hide_sensitive_logs: false + edpm_network_config_os_net_config_mappings: + edpm-networker-0: + nic2: 6d:fe:54:3f:8a:02 # CHANGEME + edpm-networker-1: + nic2: 6e:fe:54:3f:8a:02 # CHANGEME + edpm-networker-2: + nic2: 6f:fe:54:3f:8a:02 # CHANGEME + edpm_network_config_template: | + --- + {% set mtu_list = [ctlplane_mtu] %} + {% for network in nodeset_networks %} + {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} + {%- endfor %} + {% set min_viable_mtu = mtu_list | max %} + network_config: + - type: ovs_bridge + name: {{ neutron_physical_bridge_name }} + use_dhcp: false + dns_servers: {{ ctlplane_dns_nameservers }} + domain: {{ dns_search_domains }} + addresses: + - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} + routes: [] + members: + - type: interface + name: nic2 + mtu: {{ min_viable_mtu }} + # force the MAC address of the bridge to this interface + primary: true + {% for network in nodeset_networks %} + {% if not network.lower().startswith('bgp') %} + - type: vlan + mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} + vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} + addresses: + - ip_netmask: >- + {{ + lookup('vars', networks_lower[network] ~ '_ip') + }}/{{ + lookup('vars', networks_lower[network] ~ '_cidr') + }} + routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} + {% endif %} + {% endfor %} + - type: interface + name: nic3 + use_dhcp: false + addresses: + - ip_netmask: {{ lookup('vars', 'bgpnet0_ip') }}/30 + - type: interface + name: nic4 + use_dhcp: false + addresses: + - ip_netmask: {{ lookup('vars', 'bgpnet1_ip') }}/30 + - type: interface + name: lo + addresses: + - ip_netmask: {{ lookup('vars', 'bgpmainnet_ip') }}/32 + - ip_netmask: {{ lookup('vars', 'bgpmainnetv6_ip') }}/128 + edpm_nodes_validation_validate_controllers_icmp: false + edpm_nodes_validation_validate_gateway_icmp: false + edpm_enable_chassis_gw: true + edpm_sshd_allowed_ranges: + - '2620:cf:cf:aaaa::0/64' + edpm_sshd_configure_firewall: true + gather_facts: false + neutron_physical_bridge_name: br-ex + neutron_public_interface_name: eth1 + networks: + - defaultRoute: true + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + - name: BgpNet0 + subnetName: subnet0 + - name: BgpNet1 + subnetName: subnet0 + - name: BgpMainNet + subnetName: subnet0 + - name: BgpMainNetV6 + subnetName: subnet0 + - name: BgpNet0 + subnetName: subnet1 + - name: BgpNet1 + subnetName: subnet1 + - name: BgpMainNet + subnetName: subnet1 + - name: BgpMainNetV6 + subnetName: subnet1 + - name: BgpNet0 + subnetName: subnet2 + - name: BgpNet1 + subnetName: subnet2 + - name: BgpMainNet + subnetName: subnet2 + - name: BgpMainNetV6 + subnetName: subnet2 + nodes: + edpm-networker-0: + hostName: edpm-networker-0 + ansible: + ansibleHost: '2620:cf:cf:aaaa::105' + ansibleVars: + edpm_ovn_bgp_agent_local_ovn_peer_ips: + - "2620:cf::100:64:0:5" + - "2620:cf::100:65:0:5" + edpm_frr_bgp_peers: + - "2620:cf::100:64:0:5" + - "2620:cf::100:65:0:5" + networks: + - defaultRoute: true + fixedIP: '2620:cf:cf:aaaa::105' + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + - name: Bgpnet0 + subnetName: subnet0 + fixedIP: "2620:cf::100:64:0:6" + - name: Bgpnet1 + subnetName: subnet0 + fixedIP: "2620:cf::100:65:0:6" + - name: Bgpmainnet + subnetName: subnet1 + fixedIP: 172.30.0.2 + - name: BgpmainnetV6 + subnetName: subnet1 + fixedIP: f00d:f00d:f00d:f00d:172:30:0:2 + edpm-networker-1: + hostName: edpm-networker-1 + ansible: + ansibleHost: '2620:cf:cf:aaaa::106' + ansibleVars: + edpm_ovn_bgp_agent_local_ovn_peer_ips: + - "2620:cf::100:64:1:5" + - "2620:cf::100:65:1:5" + edpm_frr_bgp_peers: + - "2620:cf::100:64:1:5" + - "2620:cf::100:65:1:5" + networks: + - defaultRoute: true + fixedIP: '2620:cf:cf:aaaa::106' + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + - name: Bgpnet0 + subnetName: subnet1 + fixedIP: "2620:cf::100:64:1:6" + - name: Bgpnet1 + subnetName: subnet1 + fixedIP: "2620:cf::100:65:1:6" + - name: Bgpmainnet + subnetName: subnet1 + fixedIP: 172.30.1.2 + - name: BgpmainnetV6 + subnetName: subnet1 + fixedIP: f00d:f00d:f00d:f00d:172:30:1:2 + edpm-networker-2: + hostName: edpm-networker-2 + ansible: + ansibleHost: '2620:cf:cf:aaaa::107' + ansibleVars: + edpm_ovn_bgp_agent_local_ovn_peer_ips: + - "2620:cf::100:64:2:5" + - "2620:cf::100:65:2:5" + edpm_frr_bgp_peers: + - "2620:cf::100:64:2:5" + - "2620:cf::100:65:2:5" + networks: + - defaultRoute: true + fixedIP: '2620:cf:cf:aaaa::107' + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + - name: Bgpnet0 + subnetName: subnet1 + fixedIP: "2620:cf::100:64:2:6" + - name: Bgpnet1 + subnetName: subnet1 + fixedIP: "2620:cf::100:65:2:6" + - name: Bgpmainnet + subnetName: subnet1 + fixedIP: 172.30.2.2 + - name: BgpmainnetV6 + subnetName: subnet1 + fixedIP: f00d:f00d:f00d:f00d:172:30:2:2 + services: + - download-cache + - bootstrap + - configure-network + - validate-network + - frr + - install-os + - configure-os + - ssh-known-hosts + - run-os + - reboot-os + - install-certs + - ovn + - neutron-metadata + - ovn-bgp-agent + nova: + migration: + ssh_keys: + private: CHANGEME4 + public: CHANGEME5 diff --git a/examples/dt/bgp/bgp_dt03_ipv6/metallb/README.md b/examples/dt/bgp/bgp_dt03_ipv6/metallb/README.md new file mode 100644 index 000000000..2c3fc908c --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/metallb/README.md @@ -0,0 +1,16 @@ +# MetalLB + +Observe CRs which will be generated. +``` +kustomize build examples/dt/bgp/bgp_dt01/metallb/ +``` + +Apply the metallb kustomization from this directory. +``` +oc apply -k examples/dt/bgp/bgp_dt01/metallb/ +``` + +Then, check that a speaker is running on the OCP tester node. +``` +oc -n metallb-system wait pod -l component=speaker --field-selector=spec.host=worker-3 --for condition=Ready --timeout=300s +``` diff --git a/examples/dt/bgp/bgp_dt03_ipv6/metallb/kustomization.yaml b/examples/dt/bgp/bgp_dt03_ipv6/metallb/kustomization.yaml new file mode 100644 index 000000000..47f385790 --- /dev/null +++ b/examples/dt/bgp/bgp_dt03_ipv6/metallb/kustomization.yaml @@ -0,0 +1,19 @@ +--- +components: + - ../../../../../lib/metallb + +patches: + - target: + kind: MetalLB + name: metallb + namespace: metallb-system + patch: |- + - op: add + path: /spec/speakerTolerations + value: + - key: "testOperator" + value: "true" + effect: "NoSchedule" + - key: "testOperator" + value: "true" + effect: "NoExecute" diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 2fa21e081..e103fd303 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -4,6 +4,7 @@ - noop - rhoso-architecture-validate-bgp - rhoso-architecture-validate-bgp_dt01 + - rhoso-architecture-validate-bgp_dt03_ipv6 - rhoso-architecture-validate-hci - rhoso-architecture-validate-nfv-ovs-dpdk-sriov-hci - rhoso-architecture-validate-osasinfra diff --git a/zuul.d/validations.yaml b/zuul.d/validations.yaml index 20695b40e..38718944a 100644 --- a/zuul.d/validations.yaml +++ b/zuul.d/validations.yaml @@ -25,6 +25,21 @@ parent: rhoso-architecture-base-job vars: cifmw_architecture_scenario: bgp_dt01 +- job: + files: + - automation/mocks/bgp_dt03_ipv6.yaml + - automation/net-env/bgp_dt03_ipv6.yaml + - examples/dt/bgp/bgp_dt03_ipv6/control-plane + - examples/dt/bgp/bgp_dt03_ipv6/control-plane/nncp + - examples/dt/bgp/bgp_dt03_ipv6/edpm/computes + - examples/dt/bgp/bgp_dt03_ipv6/edpm/deployment + - examples/dt/bgp/bgp_dt03_ipv6/edpm/networkers + - lib + name: rhoso-architecture-validate-bgp_dt03_ipv6 + parent: rhoso-architecture-base-job + vars: + cifmw_architecture_scenario: bgp_dt03_ipv6 + cifmw_networking_env_def_file: automation/net-env/bgp_dt03_ipv6.yaml - job: files: - examples/va/hci