From e867165f7c16ba3b9e500e0bfcad095283f6be75 Mon Sep 17 00:00:00 2001 From: Radar231 Date: Fri, 23 Jul 2021 15:58:34 -0400 Subject: [PATCH] initial checkin --- motioneye_deployment.yml | 57 ++++++++++++++++++++++++++++++++++++++++ motioneye_metallb.yml | 27 +++++++++++++++++++ motioneye_pv.yml | 41 +++++++++++++++++++++++++++++ motioneye_pvc.yml | 37 ++++++++++++++++++++++++++ motioneye_svclb.yml | 24 +++++++++++++++++ 5 files changed, 186 insertions(+) create mode 100644 motioneye_deployment.yml create mode 100644 motioneye_metallb.yml create mode 100644 motioneye_pv.yml create mode 100644 motioneye_pvc.yml create mode 100644 motioneye_svclb.yml diff --git a/motioneye_deployment.yml b/motioneye_deployment.yml new file mode 100644 index 0000000..5d234f8 --- /dev/null +++ b/motioneye_deployment.yml @@ -0,0 +1,57 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: motioneye + labels: + app: motioneye +spec: + replicas: 1 + selector: + matchLabels: + app: motioneye + strategy: + type: Recreate + template: + metadata: + labels: + app: motioneye + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: beta.kubernetes.io/arch + operator: In + values: + - arm64 + containers: + - name: motioneye + image: ccrisan/motioneye:master-armhf + env: + - name: TZ + value: "EST5EDT" + ports: + - containerPort: 8081 + - containerPort: 8082 + - containerPort: 8765 + volumeMounts: + - name: motioneye-etc + mountPath: /etc/motioneye + - name: motioneye-var-lib + mountPath: /var/lib/motioneye + - name: tz-config + mountPath: /etc/localtime + volumes: + - name: motioneye-etc + persistentVolumeClaim: + claimName: motioneye-etc-pvc + - name: motioneye-var-lib + persistentVolumeClaim: + claimName: motioneye-var-lib-pvc + - name: tz-config + hostPath: + path: /usr/share/zoneinfo/EST5EDT + +# EOF diff --git a/motioneye_metallb.yml b/motioneye_metallb.yml new file mode 100644 index 0000000..fc1ae18 --- /dev/null +++ b/motioneye_metallb.yml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: motioneye + annotations: + metallb.universe.tf/allow-shared-ip: share222 +spec: + selector: + app: motioneye + type: LoadBalancer + # loadBalancerIP is optional. MetalLB will automatically allocate an IP + # from its pool if not specified. You can also specify one manually. + # loadBalancerIP: x.y.z.a + loadBalancerIP: 192.168.7.222 + ports: + - name: port8081 + protocol: TCP + port: 8081 + - name: port8082 + protocol: TCP + port: 8082 + - name: port8765 + protocol: TCP + port: 8765 + +# EOF diff --git a/motioneye_pv.yml b/motioneye_pv.yml new file mode 100644 index 0000000..2a1389e --- /dev/null +++ b/motioneye_pv.yml @@ -0,0 +1,41 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: motioneye-etc-pv + labels: + name: motioneye-etc-pv +spec: + storageClassName: manual + capacity: + storage: 5Gi + accessModes: + - ReadWriteOnce + mountOptions: + - hard + - nfsvers=4.0 + nfs: + server: 192.168.7.11 + path: "/volume1/k8s-storage/motioneye-etc" + +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: motioneye-var-lib-pv + labels: + name: motioneye-var-lib-pv +spec: + storageClassName: manual + capacity: + storage: 5Gi + accessModes: + - ReadWriteOnce + mountOptions: + - hard + - nfsvers=4.0 + nfs: + server: 192.168.7.11 + path: "/volume1/k8s-storage/motioneye-var-lib" + +# EOF diff --git a/motioneye_pvc.yml b/motioneye_pvc.yml new file mode 100644 index 0000000..879c1df --- /dev/null +++ b/motioneye_pvc.yml @@ -0,0 +1,37 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: motioneye-etc-pvc + labels: + app: motioneye +spec: + accessModes: + - ReadWriteOnce + storageClassName: "manual" + resources: + requests: + storage: 5Gi + selector: + matchLabels: + name: motioneye-etc-pv + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: motioneye-var-lib-pvc + labels: + app: motioneye +spec: + accessModes: + - ReadWriteOnce + storageClassName: "manual" + resources: + requests: + storage: 5Gi + selector: + matchLabels: + name: motioneye-var-lib-pv + +# EOF diff --git a/motioneye_svclb.yml b/motioneye_svclb.yml new file mode 100644 index 0000000..a75988e --- /dev/null +++ b/motioneye_svclb.yml @@ -0,0 +1,24 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: motioneye +spec: + selector: + app: motioneye + ports: + - protocol: TCP + port: 8081 + name: port8081 + targetPort: 8081 + - protocol: TCP + port: 8082 + name: port8082 + targetPort: 8082 + - protocol: TCP + port: 8765 + name: port8765 + targetPort: 8765 + type: LoadBalancer + +# EOF