Zero-Downtime Migration: Moving Resources Between Argo CD ApplicationSets
Migrating resources from one ApplicationSet to another can be nerve-wracking. If you simply delete the old Set, Argo CD's cascading deletion will wipe out your Applications and their underlying Kub...

Source: DEV Community
Migrating resources from one ApplicationSet to another can be nerve-wracking. If you simply delete the old Set, Argo CD's cascading deletion will wipe out your Applications and their underlying Kubernetes resources. Here is a concise, step-by-step guide to performing this migration safely using the Orphan strategy. The Concept: "Orphaning" your Apps The goal is to delete the "parent" (ApplicationSet) while leaving the "children" (Applications) and "grandchildren" (K8s Resources) intact, allowing a new parent to take ownership. Step 1: Apply the Safety Net Before touching anything, you must tell the ApplicationSet controller not to clean up its resources upon deletion. Add the preserveResourcesOnDeletion flag to your current (old) ApplicationSet: spec: syncPolicy: preserveResourcesOnDeletion: true Why? This ensures that when the ApplicationSet is deleted, the Application objects it generated remain in the cluster as standalone apps. Step 2: Detach the Old Set Now, delete the old Applica