apiVersion: v1
kind: Secret
metadata:
  name: argocd-infra-repo
  namespace: argocd
  labels:
    argocd.argoproj.io/secret-type: repository
stringData:
  url: {{ target_repo_url }}
  name: argocd-infra-repo
  type: git
  project: default
  password: {{ target_repo_password }}
  username: {{ target_repo_username }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: ubermold
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  destination:
    namespace: argocd
    server: https://kubernetes.default.svc
  project: default
  source:
    path: {{ target_repo_path }}
    repoURL: {{ target_repo_url }}
    targetRevision: main
    helm:
      valueFiles:
        - values.yaml
  syncPolicy:
    automated:
      prune: true
      allowEmpty: false
    syncOptions:
      - CreateNamespace=true
      - PrunePropagationPolicy=foreground
      - PruneLast=true
