apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: glitchtip
  namespace: glitchtip
spec:
  interval: 5m
  timeout: 10m
  values:
    universal-chart:
      services:
        web:
          deployment:
            replicaCount:
              _default: 1
          envs:
            - name: SERVER_ROLE
              value:
                _default: web
            - name: PORT
              value:
                _default: "8000"
            - name: GLITCHTIP_DOMAIN
              value:
                _default: https://glitchtip.contour.infra.sarex.tech
            - name: ENABLE_OPEN_USER_REGISTRATION
              value:
                _default: "false"
          serviceAccount:
            enabled: true
            name:
              _default: glitchtip-vault
        worker:
          deployment:
            replicaCount:
              _default: 1
          envs:
            - name: SERVER_ROLE
              value:
                _default: worker
            - name: PORT
              value:
                _default: "8000"
            - name: GLITCHTIP_DOMAIN
              value:
                _default: https://glitchtip.contour.infra.sarex.tech
          serviceAccount:
            enabled: false
            name:
              _default: glitchtip-vault
    glitchtip:
      secret:
        create: false
        name: glitchtip-secret
      migrate:
        enabled: true
        env:
          PORT: "8000"
          GLITCHTIP_DOMAIN: https://glitchtip.contour.infra.sarex.tech
      vault:
        enabled: true
        role: glitchtip
        authPath: auth/kubernetes
        secretPath: secrets/data/vault/apps/glitchtip
