deploy nmstate operator
This commit is contained in:
30
cluster/nmstate.yaml
Normal file
30
cluster/nmstate.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: external-secrets
|
||||||
|
namespace: openshift-gitops
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: openshift-operators
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
path: cluster/nmstate/overlays/hub
|
||||||
|
repoURL: https://github.com/rblundon/homelab.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- RespectIgnoreDifferences=true
|
||||||
|
- CreateNamespace=true
|
||||||
|
managedNamespaceMetadata:
|
||||||
|
labels:
|
||||||
|
argocd.argoproj.io/managed-by: openshift-gitops
|
||||||
|
|
||||||
11
cluster/nmstate/base/kustomization.yaml
Normal file
11
cluster/nmstate/base/kustomization.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- operatorgroup.yaml
|
||||||
|
- subscription.yaml
|
||||||
|
- nmstate.yaml
|
||||||
|
- multinetwork-enable.yaml
|
||||||
|
|
||||||
6
cluster/nmstate/base/multinetwork-enable.yaml
Normal file
6
cluster/nmstate/base/multinetwork-enable.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: operator.openshift.io/v1
|
||||||
|
kind: Network
|
||||||
|
metadata:
|
||||||
|
name: cluster
|
||||||
|
spec:
|
||||||
|
useMultiNetworkPolicy: true
|
||||||
12
cluster/nmstate/base/namespace.yaml
Normal file
12
cluster/nmstate/base/namespace.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubernetes.io/metadata.name: openshift-nmstate
|
||||||
|
name: openshift-nmstate
|
||||||
|
argocd.argoproj.io/managed-by: openshift-gitops-operator
|
||||||
|
name: openshift-nmstate
|
||||||
|
spec:
|
||||||
|
finalizers:
|
||||||
|
- kubernetes
|
||||||
5
cluster/nmstate/base/nmstate.yaml
Normal file
5
cluster/nmstate/base/nmstate.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: nmstate.io/v1
|
||||||
|
kind: NMState
|
||||||
|
metadata:
|
||||||
|
name: nmstate
|
||||||
|
spec: {}
|
||||||
11
cluster/nmstate/base/operatorgroup.yaml
Normal file
11
cluster/nmstate/base/operatorgroup.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
apiVersion: operators.coreos.com/v1
|
||||||
|
kind: OperatorGroup
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
# olm.providedAPIs: NMState.v1.nmstate.io
|
||||||
|
name: openshift-nmstate
|
||||||
|
namespace: openshift-nmstate
|
||||||
|
spec:
|
||||||
|
targetNamespaces:
|
||||||
|
- openshift-nmstate
|
||||||
14
cluster/nmstate/base/subscription.yaml
Normal file
14
cluster/nmstate/base/subscription.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
apiVersion: operators.coreos.com/v1alpha1
|
||||||
|
kind: Subscription
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
operators.coreos.com/kubernetes-nmstate-operator.openshift-nmstate: ""
|
||||||
|
name: kubernetes-nmstate-operator
|
||||||
|
namespace: openshift-nmstate
|
||||||
|
spec:
|
||||||
|
channel: stable
|
||||||
|
installPlanApproval: Automatic
|
||||||
|
name: kubernetes-nmstate-operator
|
||||||
|
source: redhat-operators
|
||||||
|
sourceNamespace: openshift-marketplace
|
||||||
9
cluster/nmstate/overlays/hub/kustomization.yaml
Normal file
9
cluster/nmstate/overlays/hub/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
|
||||||
39
cluster/nmstate/overlays/hub/ocp-storage-vlan.yaml
Normal file
39
cluster/nmstate/overlays/hub/ocp-storage-vlan.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
apiVersion: nmstate.io/v1
|
||||||
|
kind: NodeNetworkConfigurationPolicy
|
||||||
|
metadata:
|
||||||
|
name: vlan121-localnet
|
||||||
|
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: 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
|
||||||
Reference in New Issue
Block a user