apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: queue-crd
  namespace: cicd
  annotations:
    argocd.argoproj.io/sync-wave: "2"
spec:
  project: kmsvc
  source:
    repoURL: https://forgejo.riotpiao.com/rock/kafaka-management-service.git
    targetRevision: main
    path: k8s/charts/queue-crd
    helm:
      values: |
        namespace: sqs
        kafkaBrokers: "kmsvc-kafka-bootstrap.sqs.svc.cluster.local:9092"
        redisAddr: "kmsvc-redis-master.sqs.svc.cluster.local:6379"
        image:
          repository: forgejo.riotpiao.com/rock/kafka-management-service-queue-operator
          # CI (.forgejo/workflows/release.yaml) writes the released git tag
          # here and pushes the commit -- ArgoCD picks it up on its next sync.
          tag: latest
  destination:
    server: https://kubernetes.default.svc
    namespace: sqs
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
