apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: pihole
  namespace: {{ .Release.Namespace }}
spec:
  chart:
    spec:
      chart: charts/pihole
      sourceRef:
        kind: GitRepository
        name: pcloud
        namespace: {{ .Global.Id }}
  interval: 1m0s
  values:
    domain: {{ .Values.Subdomain}}.{{ .Global.PrivateDomain }}
    pihole:
      fullnameOverride: pihole
      image:
        repository: "pihole/pihole"
        tag: v5.8.1
      persistentVolumeClaim:
        enabled: true
        size: 5Gi
      adminPassword: admin
      ingress:
        enabled: false
      serviceDhcp:
        enabled: false
      serviceDns:
        type: ClusterIP
      serviceWeb:
        type: ClusterIP
        http:
          enabled: true
        https:
          enabled: false
      virtualHost: {{ .Values.Subdomain }}.{{ .Global.PrivateDomain }}
      resources:
        requests:
          cpu: "250m"
          memory: "100M"
        limits:
          cpu: "500m"
          memory: "250M"
    oauth2:
      secretName: oauth2-secret
      configName: oauth2-proxy
      hydraAdmin: http://hydra-admin.{{ .Global.NamespacePrefix }}core-auth.svc
    hydraPublic: https://hydra.{{ .Global.Domain }}
    profileUrl: https://accounts-ui.{{ .Global.Domain }}
    ingressClassName: {{ .Global.Id }}-ingress-private
