apiVersion: apps/v1
kind: Deployment
metadata:
  name: pihole
  namespace: pihole
  labels:
    app: pihole
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pihole
  template:
    metadata:
      labels:
        app: pihole
        name: pihole
    spec:
      containers:
      - name: pihole
        image: pihole/pihole:latest
        imagePullPolicy: Always
        env:
        - name: TZ
          value: "Asia/Jerusalem"
        - name: WEBPASSWORD
          value: "secret"
        volumeMounts:
        - name: pihole-etc
          mountPath: "/etc/pihole"
        - name: pihole-dnsmasq
          mountPath: "/etc/dnsmasq.d"
      volumes:
      - name: pihole-etc
        persistentVolumeClaim:
          claimName: pihole-etc
      - name: pihole-dnsmasq
        persistentVolumeClaim:
          claimName: pihole-dnsmasq
