refactor nmstate to appset

This commit is contained in:
2025-07-29 21:53:30 -05:00
parent 4a2120f830
commit 5e1522fefb
13 changed files with 232 additions and 2 deletions

View File

@@ -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"
# }
# }

View File

@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonAnnotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
resources:
- ../../base
- ocp-storage-vlan.yaml

View File

@@ -0,0 +1,30 @@
---
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
name: storage-network-ocp-hub
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
nodeSelector:
kubernetes.io/hostname: ocp-hub
desiredState:
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: storage-network
state: up
type: linux-bridge
description: Linux bridge with enp1s0 as a port on VLAN 121