After a repo restructure, Argo CD automatically deleted the production `orders` Deployment and its Service.
Likely causes → An Application with syncPolicy.automated.prune: true pointed at a path that moved or became empty. Argo CD saw the resources were no longer in Git and pruned them. An ApplicationSet generator that stopped matching a directory can delete the whole Application the same way.
Diagnose →
argocd app history orders
argocd app get orders -o json | jq '.spec.source'
git log --stat -3 -- apps/orders/
Fix → Revert the Git change so the manifests are back at the expected path; Argo CD recreates them. Or sync manually from the previous revision. Then check what state was lost (PVCs, load balancer DNS names that changed).
Prevent → Protect critical resources with argocd.argoproj.io/sync-options: Prune=false or Delete=false, set preserveResourcesOnDeletion: true on ApplicationSets, require review on path changes, and use allowEmpty: false (the default) so an empty path doesn't prune everything.