apiVersion: apps/v1
kind: Deployment
metadata:
  name: pihole-deploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pihole-app
  template:
    metadata:
      labels:
        app: pihole-app
        terraform: "false"
    spec:
      volumes:
      # - name: data-vol
      #   hostPath:
      #     path: /home/sasha/pihole/etc-pihole
      - name: data-pihole-pvc-v
        persistentVolumeClaim:
          claimName: data-pihole-pvc
      containers:
      - name: pihole-app-main-container
        image: pihole/pihole:dev
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: data-pihole-pvc-v
          mountPath: /etc/pihole
        # - name: data-vol
        #   mountPath: /etc/pihole
        ports:
        - name: ui-http
          containerPort: 80
          protocol: TCP
        - name: ui-https
          containerPort: 443
          protocol: TCP
        - name: dns-53-udp
          containerPort: 53
          protocol: UDP
        - name: dns-53-tcp
          containerPort: 53
          protocol: TCP
        - name: dhcp-67-udp
          containerPort: 67
          protocol: UDP
        env:
        - name: TZ
          value: "Europe/Moscow"
        # - name: WEBPASSWORD
        #   value: "" # will be replaced with hc vault
        # resources:
        #   limits:
        #     memory: "128Mi"
        #     cpu: "500m"
