From 5ad067785dc6ee7dcf6a043da7096335027ffac2 Mon Sep 17 00:00:00 2001 From: rblundon Date: Sat, 17 May 2025 20:13:10 -0500 Subject: [PATCH] networking --- cluster/nmstate/overlays/hub/iscsi-nad.yaml | 38 ++++++++++++++ .../nmstate/overlays/hub/kustomization.yaml | 2 +- .../overlays/hub/ocp-storage-vlan.yaml | 51 ++++++++----------- 3 files changed, 60 insertions(+), 31 deletions(-) create mode 100644 cluster/nmstate/overlays/hub/iscsi-nad.yaml diff --git a/cluster/nmstate/overlays/hub/iscsi-nad.yaml b/cluster/nmstate/overlays/hub/iscsi-nad.yaml new file mode 100644 index 0000000..913259d --- /dev/null +++ b/cluster/nmstate/overlays/hub/iscsi-nad.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + annotations: + description: Native VLAN connection for iSCSI + name: vlan121-localnet + namespace: default +spec: + config: |- + { + "name": "iscsi-net", + "cniVersion": "0.3.1", + "type": "vlan", + "master": "enp1s0f0", + "mtu": 1500, + "vlanId": 121, + "linkInContainer": false, + "ipam": { + "type": "static", + "addresses": [ + { + "address": "10.10.121.10/24" + } + ] + } + } + + # { + # "cniVersion": "0.3.1", + # "name": "bridge-net", + # "type": "bridge", + # "isGateway": true, + # "vlan": 2, + # "ipam": { + # "type": "dhcp" + # } + # } \ No newline at end of file diff --git a/cluster/nmstate/overlays/hub/kustomization.yaml b/cluster/nmstate/overlays/hub/kustomization.yaml index 062a08b..c1685d6 100644 --- a/cluster/nmstate/overlays/hub/kustomization.yaml +++ b/cluster/nmstate/overlays/hub/kustomization.yaml @@ -6,4 +6,4 @@ commonAnnotations: resources: - ../../base -- ocp-storage-vlan.yaml +#- ocp-storage-vlan.yaml diff --git a/cluster/nmstate/overlays/hub/ocp-storage-vlan.yaml b/cluster/nmstate/overlays/hub/ocp-storage-vlan.yaml index 2e1d341..1ffa5f5 100644 --- a/cluster/nmstate/overlays/hub/ocp-storage-vlan.yaml +++ b/cluster/nmstate/overlays/hub/ocp-storage-vlan.yaml @@ -2,38 +2,29 @@ apiVersion: nmstate.io/v1 kind: NodeNetworkConfigurationPolicy metadata: - name: vlan121-localnet + name: storage-network-ocp-hub spec: nodeSelector: kubernetes.io/hostname: ocp-hub - desiredState: - ovn: - bridge-mappings: - - localnet: vlan121-net - bridge: br-ex - vlan-id: 121 - ip-address: - - ip: 10.10.121.10 - prefix-length: 24 - state: present + interfaces: + - name: enp1s0f0.121 + state: up + type: vlan + vlan: + base-iface: enp1s0f0 + id: 121 + - bridge: + port: + - name: enp1s0f0.121 + ipv4: + address: + - ip: 10.10.121.10 + prefix-length: 24 + enabled: true + name: br-iscsi + state: up + type: linux-bridge + description: OVS bridge with enp1s0f0 as a port on VLAN 121 + - # interfaces: - # - name: enp1s0.121 - # state: up - # type: vlan - # vlan: - # base-iface: enp1s0 - # id: 121 - # - bridge: - # port: - # - name: enp1s0.121 - # ipv4: - # address: - # - ip: 10.10.121.10 - # prefix-length: 24 - # enabled: true - # name: storage-network - # state: up - # type: linux-bridge - # description: Linux bridge with enp1s0 as a port on VLAN 121