apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: rabbitmq
  namespace: argocd
spec:
  project: default
  source:
    repoURL: 'https://github.com/zero-down-time/kubezero'
    path: charts/kubezero-mq
    targetRevision: master
    helm:
      values: |
        rabbitmq:
          enabled: true

          replicaCount: 3

          hosts:
          - mq.example.com
          auth:
            password: blablabla
            erlangCookie: changemeplease
            tls:
              enabled: true

          # Some custom plugin to be installed at boot
          communityPlugins: "https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/3.8.9/rabbitmq_delayed_message_exchange-3.8.9-0199d11c.ez"
          extraPlugins: "rabbitmq_delayed_message_exchange"

          # Enabled metrics
          metrics:
            enabled: true
            serviceMonitor:
              enabled: true

  destination:
    server: 'https://kubernetes.default.svc'
    namespace: rabbitmq
  syncPolicy:
    automated:
      prune: true
    syncOptions:
    - CreateNamespace=true
