apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: longhorn
  namespace: longhorn-system
spec:
  interval: 5m
  chart:
    spec:
      chart: longhorn
      version: "1.7.2"
      sourceRef:
        kind: HelmRepository
        name: longhorn-charts
        namespace: flux-system

  values:
    longhornUI:
      replicas: 1

    ingress:
      enabled: true
      annotations:
        traefik.ingress.kubernetes.io/router.entrypoints: websecure
        traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd
      host: lnghrn.${SECRET_NEW_DOMAIN}
      tls: true

    persistence:
      defaultClassReplicaCount: 1 # TODO: When the cluster expands, expand the replica count
      defaultClass: false