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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions automation/net-env/uni04delta-adoption.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,52 @@ instances:
prefix_length_v4: 24
skip_nm: false
vlan_id: 122
ocp-3:
hostname: worker-0
name: ocp-3
networks:
ctlplane:
interface_name: enp6s0
ip_v4: 192.168.122.20
mac_addr: "52:54:02:18:86:bc"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: ctlplane
prefix_length_v4: 24
skip_nm: false
internalapi:
interface_name: enp6s0.120
ip_v4: 172.17.0.20
mac_addr: "52:54:00:04:df:88"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: internalapi
parent_interface: enp6s0
prefix_length_v4: 24
skip_nm: false
vlan_id: 120
storage:
interface_name: enp6s0.121
ip_v4: 172.18.0.20
mac_addr: "52:54:00:7e:b2:1d"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: storage
parent_interface: enp6s0
prefix_length_v4: 24
skip_nm: false
vlan_id: 121
tenant:
interface_name: enp6s0.122
ip_v4: 172.19.0.20
mac_addr: "52:54:00:12:d1:e1"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: tenant
parent_interface: enp6s0
prefix_length_v4: 24
skip_nm: false
vlan_id: 122
networker-0:
hostname: networker-0
name: networker-0
Expand Down
4 changes: 2 additions & 2 deletions automation/vars/uni04delta-adoption.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vas:
uni04delta-adoption:
stages:
- name: nncp-configuration
path: examples/dt/uni04delta/control-plane/networking/nncp
path: examples/dt/uni04delta-adoption/control-plane/networking/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
Expand All @@ -16,7 +16,7 @@ vas:
build_output: nncp.yaml

- name: network-configuration
path: examples/dt/uni04delta/control-plane/networking
path: examples/dt/uni04delta-adoption/control-plane/networking
wait_conditions:
- >-
oc -n metallb-system wait pod
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../dt/uni04delta/networking

resources:
- nncp/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nncp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true

components:
- ../../../../../../dt/uni04delta/networking/nncp

resources:
- values.yaml
- ocp_worker_nodes.yaml

replacements:
# Static Node IPs: node-3 (worker-0)
- source:
kind: ConfigMap
name: network-values
fieldPath: data.node_3.internalapi_ip
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: node-3
fieldPaths:
- spec.desiredState.interfaces.[name=internalapi].ipv4.address.0.ip
- source:
kind: ConfigMap
name: network-values
fieldPath: data.node_3.tenant_ip
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: node-3
fieldPaths:
- spec.desiredState.interfaces.[name=tenant].ipv4.address.0.ip
- source:
kind: ConfigMap
name: network-values
fieldPath: data.node_3.ctlplane_ip
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: node-3
fieldPaths:
- spec.desiredState.interfaces.[type=linux-bridge].ipv4.address.0.ip
- source:
kind: ConfigMap
name: network-values
fieldPath: data.node_3.storage_ip
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: node-3
fieldPaths:
- spec.desiredState.interfaces.[name=storage].ipv4.address.0.ip

# prefix-length: node-3
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.prefix-length
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: node-3
fieldPaths:
- spec.desiredState.interfaces.[type=linux-bridge].ipv4.address.0.prefix-length
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.prefix-length
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: node-3
fieldPaths:
- spec.desiredState.interfaces.[name=internalapi].ipv4.address.0.prefix-length
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.prefix-length
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: node-3
fieldPaths:
- spec.desiredState.interfaces.[name=tenant].ipv4.address.0.prefix-length
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.prefix-length
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: node-3
fieldPaths:
- spec.desiredState.interfaces.[name=storage].ipv4.address.0.prefix-length

# Node name and hostname selector
- 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]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
name: node-3
labels:
osp/nncm-config-type: standard
Loading
Loading