apiVersion: argoproj.io/v1alpha1
kind: Application

metadata:
  name: ecommerce-app
  namespace: argocd

spec:
  project: default

  source:
    repoURL: https://gitea.cruzcloud.net/devops/apps-registry.git
    targetRevision: main
    path: workloads/ecommerce
    kustomize: {}

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

  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true