# services/gitops-ui/helmrelease.yaml
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: weave-gitops
  namespace: flux-system
spec:
  interval: 30m
  chart:
    spec:
      chart: ./charts/gitops-server
      sourceRef:
        kind: GitRepository
        name: weave-gitops-upstream
        namespace: flux-system
      # track upstream tag; see source object for version pin
  install:
    remediation:
      retries: 3
  upgrade:
    remediation:
      retries: 3
      remediateLastFailure: true
    cleanupOnFail: true
  values:
    additionalArgs:
      - --auth-methods=oidc
    adminUser:
      create: false
    ingress:
      enabled: true
      className: traefik
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt
        traefik.ingress.kubernetes.io/router.entrypoints: websecure
        traefik.ingress.kubernetes.io/router.tls: "true"
      hosts:
        - host: cd.bstein.dev
          paths:
            - path: /
              pathType: Prefix
      tls:
        - secretName: gitops-ui-tls
          hosts:
            - cd.bstein.dev
    oidcSecret:
      create: false
    metrics:
      enabled: true
