- Enable prune: true to auto-delete orphaned resources - Add finalizers for proper resource cleanup - Add PrunePropagationPolicy and PruneLast sync options - Set revisionHistoryLimit to 10
33 lines
728 B
YAML
33 lines
728 B
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: tekton-ci-cd
|
|
namespace: argocd
|
|
finalizers:
|
|
- resources-finalizer.argocd.argoproj.io
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: https://github0213.com/K3S-HOME/platform.git
|
|
targetRevision: main
|
|
path: tekton/ci-cd/manifests
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: tekton-pipelines
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
allowEmpty: false
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
- PrunePropagationPolicy=foreground
|
|
- PruneLast=true
|
|
retry:
|
|
limit: 5
|
|
backoff:
|
|
duration: 5s
|
|
factor: 2
|
|
maxDuration: 3m
|
|
revisionHistoryLimit: 10
|