---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: unifi-controller
  labels:
    app: unifi-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: unifi-controller
  template:
    metadata:
      labels:
        app: unifi-controller
        name: unifi-controller
    spec:
      containers:
        - name: unifi-controller
          image: jacobalberty/unifi:v6.2
          imagePullPolicy: Always
          env:
          - name: TZ
            valueFrom:
              configMapKeyRef:
                name: unifi-env
                key: TZ
          volumeMounts:
            - name: unifi-data-volume
              mountPath: /unifi
      volumes:
        - name: unifi-data-volume
          persistentVolumeClaim:
            claimName: pvc-nfs-kubedata-unifi-data
