apiVersion: argoproj.io/v1alpha1
kind: Application

metadata:
  name: monitoring-app
  namespace: argocd

spec:
  project: default

  source:
    repoURL: https://prometheus-community.github.io/helm-charts
    chart: kube-prometheus-stack
    targetRevision: 58.3.3

    helm:
      parameters:
        - name: prometheusOperator.admissionWebhooks.patch.ttlSecondsAfterFinished
          value: "60"

      valuesObject:
        grafana:
          ingress:
            enabled: true
            ingressClassName: traefik
            hosts:
              - grafana.cruzcloud.net

  destination:
    server: https://kubernetes.default.svc
    namespace: monitoring

  syncPolicy:
    automated:
      prune: true
      selfHeal: true

    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true