From 0139161672c029a798742249a7d81861e645fe26 Mon Sep 17 00:00:00 2001 From: Luca Miccini Date: Sat, 28 Sep 2024 11:36:21 +0200 Subject: [PATCH] Add swift interface --- dt/pidone/kustomization.yaml | 30 +++++++++++++++++++++++ examples/dt/pidone/nncp/values.yaml | 37 +++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/dt/pidone/kustomization.yaml b/dt/pidone/kustomization.yaml index 540fe2c84..d11def834 100644 --- a/dt/pidone/kustomization.yaml +++ b/dt/pidone/kustomization.yaml @@ -39,7 +39,37 @@ patches: - _replaced_ mtu: 1500 + - target: + kind: NetConfig + patch: |- + - op: add + path: /spec/networks/- + value: + name: swift + mtu: 1500 + dnsDomain: _replaced_ + subnets: + - _replaced_ + replacements: + - source: + kind: ConfigMap + name: network-values + fieldPath: data.swift.dnsDomain + targets: + - select: + kind: NetConfig + fieldPaths: + - spec.networks.[name=swift].dnsDomain + - source: + kind: ConfigMap + name: network-values + fieldPath: data.swift.subnets + targets: + - select: + kind: NetConfig + fieldPaths: + - spec.networks.[name=swift].subnets - source: kind: ConfigMap name: service-values diff --git a/examples/dt/pidone/nncp/values.yaml b/examples/dt/pidone/nncp/values.yaml index bcc14d8ed..1bbfe361c 100644 --- a/examples/dt/pidone/nncp/values.yaml +++ b/examples/dt/pidone/nncp/values.yaml @@ -14,42 +14,49 @@ data: tenant_ip: 172.19.0.5 ctlplane_ip: 192.168.122.10 storage_ip: 172.18.0.5 + swift_ip: 172.22.0.5 node_1: name: ostest-master-1 internalapi_ip: 172.17.0.6 tenant_ip: 172.19.0.6 ctlplane_ip: 192.168.122.11 storage_ip: 172.18.0.6 + swift_ip: 172.22.0.6 node_2: name: ostest-master-2 internalapi_ip: 172.17.0.7 tenant_ip: 172.19.0.7 ctlplane_ip: 192.168.122.12 storage_ip: 172.18.0.7 + swift_ip: 172.22.0.7 node_3: name: ostest-worker-0 internalapi_ip: 172.17.0.8 tenant_ip: 172.19.0.8 ctlplane_ip: 192.168.122.13 storage_ip: 172.18.0.8 + swift_ip: 172.22.0.8 node_4: name: ostest-worker-1 internalapi_ip: 172.17.0.9 tenant_ip: 172.19.0.9 ctlplane_ip: 192.168.122.14 storage_ip: 172.18.0.9 + swift_ip: 172.22.0.9 node_5: name: ostest-worker-2 internalapi_ip: 172.17.0.10 tenant_ip: 172.19.0.10 ctlplane_ip: 192.168.122.15 storage_ip: 172.18.0.10 + swift_ip: 172.22.0.10 node_6: name: ostest-worker-3 internalapi_ip: 172.17.0.11 tenant_ip: 172.19.0.11 ctlplane_ip: 192.168.122.16 storage_ip: 172.18.0.11 + swift_ip: 172.22.0.11 # networks ctlplane: @@ -196,6 +203,36 @@ data: gateway: 10.0.0.1 name: subnet1 mtu: 1500 + swift: + dnsDomain: swift.example.com + subnets: + - allocationRanges: + - end: 172.22.0.250 + start: 172.22.0.100 + cidr: 172.22.0.0/24 + gateway: 172.22.0.1 + name: subnet1 + vlan: 25 + mtu: 1500 + prefix-length: 24 + iface: swift + vlan: 25 + base_iface: enp6s0 + lb_addresses: + - 172.22.0.80-172.22.0.90 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "swift", + "type": "macvlan", + "master": "swift", + "ipam": { + "type": "whereabouts", + "range": "172.22.0.0/24", + "range_start": "172.22.0.100", + "range_end": "172.22.0.250" + } + } datacentre: net-attach-def: | {