apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: open-webui
  finalizers:
  - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
    repoURL: 'https://helm.openwebui.com/'
    targetRevision: 8.*.*
    helm:
      parameters:
        - name: serviceAccount.enable
          value: 'false'
        - name: persistence.size
          value: 200Gi
        - name: existingClaim
          value: "open-webui"
        - name: ollama.enabled
          value: 'false'  
      #  - name: ollama.persistentVolume.enabled
      #    value: 'true'
      #  - name: ollama.persistence.existingClaim
      #    value: "open-webui-llm-storage"
      #  - name: ollama.persistenceVolume.size
      #    value: 200Gi
        - name: ingress.class
          value: 'traefik'
        - name: ingress.enabled
          value: 'true'
        - name: ingress.host
          value: "innollm.innovation-hub-niedersachsen.de"
        - name: ingress.tls
          value: 'true'
        - name: ingress.existingSecret
          value: 'innollm-tls'
        - name: ingress.annotations.kubernetes\.io\/ingress\.class
          value: traefik
        - name: ingress.annotations.traefik\.ingress\.kubernetes\.io\/router\.tls
          value: 'true'
          forceString: true
        - name: ingress.annotations.cert-manager\.io\/cluster-issuer
          value: lets-encrypt
    chart: open-webui
  destination:
    server: 'https://kubernetes.default.svc'
    namespace: open-webui
  syncPolicy:
    managedNamespaceMetadata:
      labels: 
        pod-security.kubernetes.io/enforce: 'privileged'
    automated:
      selfHeal: true
      prune: true
    syncOptions:
      - CreateNamespace=true
