How to avoid backup deletion during Velero upgrades via Argo CD.
Introduction
A quick tip on how to avoid backup deletion during Velero upgrades via Argo CD.
Problem
Initially when upgrading Velero with Argo CD, any backup objects created from a schedule would be pruned, as they
had no owner ref. Setting the schedule’s useOwnerReferencesInBackup
value to true
within the
Velero helm chart
fixed that specific problem.
However, on subsequent Velero upgrades where the schedule was affected, all backups would also be removed, due to
the useOwnerReferencesInBackup
setting.
Solution
The fix was to use Argo CD’s Resource Exclusion option, as shown below:
-
Edit the
argocd-cm
configmap:kubectl edit configmap argocd-cm --namespace argocd
-
Add exclusion block for velero backups:
data resource.exclusions: | - apiGroups: - "velero.io" kinds: - Backup clusters: - "*"
Leave a comment