refactor nmstate to appset
This commit is contained in:
@@ -2,5 +2,7 @@ apiVersion: operator.openshift.io/v1
|
||||
kind: Network
|
||||
metadata:
|
||||
name: cluster
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "4"
|
||||
spec:
|
||||
useMultiNetworkPolicy: true
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "1"
|
||||
labels:
|
||||
kubernetes.io/metadata.name: openshift-nmstate
|
||||
name: openshift-nmstate
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
apiVersion: nmstate.io/v1
|
||||
kind: NMState
|
||||
metadata:
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "4"
|
||||
name: nmstate
|
||||
spec: {}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
apiVersion: operators.coreos.com/v1
|
||||
kind: OperatorGroup
|
||||
metadata:
|
||||
annotations: {}
|
||||
# olm.providedAPIs: NMState.v1.nmstate.io
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "3"
|
||||
name: openshift-nmstate
|
||||
namespace: openshift-nmstate
|
||||
spec:
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
apiVersion: operators.coreos.com/v1alpha1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "2"
|
||||
labels:
|
||||
operators.coreos.com/kubernetes-nmstate-operator.openshift-nmstate: ""
|
||||
name: kubernetes-nmstate-operator
|
||||
|
||||
38
cluster/nmstate/overlays/in-cluster/iscsi-nad.yaml
Normal file
38
cluster/nmstate/overlays/in-cluster/iscsi-nad.yaml
Normal 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"
|
||||
# }
|
||||
# }
|
||||
9
cluster/nmstate/overlays/in-cluster/kustomization.yaml
Normal file
9
cluster/nmstate/overlays/in-cluster/kustomization.yaml
Normal 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
|
||||
30
cluster/nmstate/overlays/in-cluster/ocp-storage-vlan.yaml
Normal file
30
cluster/nmstate/overlays/in-cluster/ocp-storage-vlan.yaml
Normal 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
|
||||
38
cluster/nmstate/overlays/internal/iscsi-nad.yaml
Normal file
38
cluster/nmstate/overlays/internal/iscsi-nad.yaml
Normal 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"
|
||||
# }
|
||||
# }
|
||||
9
cluster/nmstate/overlays/internal/kustomization.yaml
Normal file
9
cluster/nmstate/overlays/internal/kustomization.yaml
Normal 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
|
||||
61
cluster/nmstate/overlays/internal/ocp-storage-vlan.yaml
Normal file
61
cluster/nmstate/overlays/internal/ocp-storage-vlan.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
apiVersion: nmstate.io/v1
|
||||
kind: NodeNetworkConfigurationPolicy
|
||||
metadata:
|
||||
name: storage-network-int-worker01
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "10"
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: int-worker01
|
||||
desiredState:
|
||||
interfaces:
|
||||
- name: enp2s0f0.121
|
||||
state: up
|
||||
type: vlan
|
||||
vlan:
|
||||
base-iface: enp2s0f0
|
||||
id: 121
|
||||
- bridge:
|
||||
port:
|
||||
- name: enp2s0f0.121
|
||||
ipv4:
|
||||
address:
|
||||
- ip: 10.10.121.64
|
||||
prefix-length: 24
|
||||
enabled: true
|
||||
name: storage-network
|
||||
state: up
|
||||
type: linux-bridge
|
||||
description: Linux bridge with enp1s0 as a port on VLAN 121
|
||||
|
||||
---
|
||||
apiVersion: nmstate.io/v1
|
||||
kind: NodeNetworkConfigurationPolicy
|
||||
metadata:
|
||||
name: storage-network-int-worker02
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "10"
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: int-worker02
|
||||
desiredState:
|
||||
interfaces:
|
||||
- name: enp2s0f0.121
|
||||
state: up
|
||||
type: vlan
|
||||
vlan:
|
||||
base-iface: enp2s0f0
|
||||
id: 121
|
||||
- bridge:
|
||||
port:
|
||||
- name: enp2s0f0.121
|
||||
ipv4:
|
||||
address:
|
||||
- ip: 10.10.121.65
|
||||
prefix-length: 24
|
||||
enabled: true
|
||||
name: storage-network
|
||||
state: up
|
||||
type: linux-bridge
|
||||
description: Linux bridge with enp1s0 as a port on VLAN 121
|
||||
Reference in New Issue
Block a user