apiVersion: apps/v1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
metadata:
  name: motioneye
  labels:
    app: motioneye
  namespace: motioneye
spec:
  replicas: 1
  selector:
    matchLabels:
      app: motioneye
  template:
    metadata:
      labels:
        app: 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"
