apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: loadouthq
  namespace: argocd
spec:
  project: default
  source:
    # Argo CD native OCI source: include the chart artifact and keep path set to ".".
    repoURL: oci://registry.gitlab.com/asfadev/loadouthq/charts/loadouthq
    # Pin the Helm chart version, not the Git tag (X.Y.Z, not vX.Y.Z).
    targetRevision: X.Y.Z
    path: .
    helm:
      releaseName: loadouthq
      valuesObject:
        global:
          existingSecret: loadouthq-runtime
        config:
          appBaseUrl: https://loadouthq.example.com
          apiPublicUrl: https://loadouthq.example.com
          corsOrigin: https://loadouthq.example.com
          sessionCookieSecure: true
          platformAdminEmail: admin@example.com
          registrationEnabled: false
          orgCreationEnabled: false
          localAuthEnabled: true
        license:
          existingSecret: loadouthq-license
          secretKey: license.lhq-license
        imagePullSecrets:
          - name: loadouthq-registry
        ingress:
          enabled: true
          className: nginx
          host: loadouthq.example.com
          tls:
            enabled: true
            secretName: loadouthq-tls
        api:
          replicaCount: 2
          podDisruptionBudget:
            enabled: true
        web:
          replicaCount: 2
          podDisruptionBudget:
            enabled: true
  destination:
    server: https://kubernetes.default.svc
    namespace: loadouthq
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
