---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: motioneye
  labels:
    kubernetes.io/name: "MotionEye"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: motioneye
  template:
    metadata:
      labels:
        app.kubernetes.io/name: motioneye
    spec:
      volumes:
        - name: motioneye-lib-pv-storage
          persistentVolumeClaim:
            claimName: motioneye-lib-pv-claim
        - name: motioneye-etc-pv-storage
          persistentVolumeClaim:
            claimName: motioneye-etc-pv-claim
        - name: localtime
          hostPath:
            path: "/etc/localtime"
      containers:
        - name: motioneye-container
          image: ccrisan/motioneye:master-amd64
          ports:
            - containerPort: 8765
              protocol: TCP
              name: "server"
          volumeMounts:
            - mountPath: "/etc/motioneye"
              name: motioneye-etc-pv-storage
            - mountPath: "/var/lib/motioneye"
              name: motioneye-lib-pv-storage
            - mountPath: "/etc/localtime"
              name: localtime
          env:
            - name: hostname
              value: "motioneye"
