apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: influxdb
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  sources:
    - chart: influxdb
      repoURL: https://helm.influxdata.com
      targetRevision: 4.12.1
      helm:
        values: |
          config:
            reporting_disabled: true

          persistence:
            storageClass: local-path

          ingress:
            enabled: true
            tls: true
            secretName: influx-tbrnt-ch-cert
            hostname: influx.tbrnt.ch
            annotations:
              cert-manager.io/cluster-issuer: letsencrypt-prod
              traefik.ingress.kubernetes.io/router.middlewares: kube-system-redirect-https@kubernetescrd
    - chart: influxdb2
      repoURL: https://helm.influxdata.com
      targetRevision: 2.1.1
      helm:
        values: |
          image:
            tag: 2.6.1-alpine

          persistence:
            storageClass: local-path

          ingress:
            enabled: true
            tls: true
            secretName: influx2-tbrnt-ch-cert
            hostname: influx2.tbrnt.ch
            annotations:
              cert-manager.io/cluster-issuer: letsencrypt-prod
              traefik.ingress.kubernetes.io/router.middlewares: kube-system-redirect-https@kubernetescrd

          pdb:
            create: false
  destination:
    namespace: influxdb
    server: https://kubernetes.default.svc
  project: system
  syncPolicy:
    syncOptions:
      - CreateNamespace=true
