apiVersion: apps/v1
kind: Deployment
metadata:
  name: unpoller
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: unpoller
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: unpoller
    helm.sh/chart: unpoller-4.6.2
  namespace: unpoller
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: unpoller
      app.kubernetes.io/instance: unpoller
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: unpoller
        app.kubernetes.io/name: unpoller
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: UP_UNIFI_CONTROLLER_0_SAVE_ALARMS
              value: "false"
            - name: UP_UNIFI_CONTROLLER_0_SAVE_ANOMALIES
              value: "false"
            - name: UP_UNIFI_CONTROLLER_0_SAVE_DPI
              value: "false"
            - name: UP_UNIFI_CONTROLLER_0_SAVE_EVENTS
              value: "false"
            - name: UP_UNIFI_CONTROLLER_0_SAVE_IDS
              value: "false"
            - name: UP_UNIFI_CONTROLLER_0_SAVE_SITES
              value: "true"
            - name: UP_UNIFI_CONTROLLER_0_URL
              value: https://unifi.alexlebens.net/
            - name: UP_UNIFI_CONTROLLER_0_VERIFY_SSL
              value: "false"
            - name: UP_INFLUXDB_DISABLE
              value: "true"
            - name: UP_PROMETHEUS_HTTP_LISTEN
              value: 0.0.0.0:9130
            - name: UP_PROMETHEUS_NAMESPACE
              value: unpoller
            - name: UP_POLLER_DEBUG
              value: "false"
            - name: UP_POLLER_QUIET
              value: "false"
          envFrom:
            - secretRef:
                name: unpoller-unifi-secret
          image: ghcr.io/unpoller/unpoller:v2.33.0
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            requests:
              cpu: 10m
              memory: 64Mi
