apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: applications
spec:
  destination:
    namespace: argocd
    server: 'https://kubernetes.default.svc'
  source:
    path: k8s/applications
    repoURL: 'git@bitbucket.org:jamkazam/video-iac.git'
    targetRevision: main
    helm:
      valueFiles:
      - values-production.yaml
  project: default
  syncPolicy:
    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true
      - Replace=true
    automated: 
      prune: true 
      allowEmpty: false
    retry:
      limit: 5 
      backoff:
        duration: 5s 
        factor: 2 
        maxDuration: 3m