Files
zeekayandHanzo Dev 446e343a3d cd: annotations are cd.hanzo.ai, API group is apps.hanzo.ai
Two corrections on top of the naming pass, both found by checking the live
cluster rather than the source.

The rename had silently changed the user-facing annotation key from
argocd.argoproj.io/sync-wave to cd.argoproj.io/sync-wave — 63 live
Applications carry the old key, so deploying that would have ignored every
sync-wave and broken fleet deploy ordering. The key is now cd.hanzo.ai/*,
and universe 575650286 moves the ApplicationSet template that stamps it, so
the controller regenerates all 63 consistently.

The API group in code said argoproj.io/v1alpha1 in 157 places while the
cluster has served apps.hanzo.ai/v1alpha1 since 2026-07-23 (the CRDs are
applications.apps.hanzo.ai). Code now matches what is actually served.

The legacy applications.argoproj.io/app-name label had ZERO live users, so it
went with the rest. foo.argoproj.io test fixtures became foo.example.com —
arbitrary test domains should not carry a vendor name.

go build ./... exit 0.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 16:32:14 -07:00

2.2 KiB

Application Pruning & Resource Deletion

All Application resources created by the ApplicationSet controller (from an ApplicationSet) will contain:

  • A .metadata.ownerReferences reference back to the parent ApplicationSet resource
  • An Hanzo CD resources-finalizer.cd.hanzo.ai finalizer in .metadata.finalizers of the Application if .syncPolicy.preserveResourcesOnDeletion is set to false.

The end result is that when an ApplicationSet is deleted, the following occurs (in rough order):

  • The ApplicationSet resource itself is deleted
  • Any Application resources that were created from this ApplicationSet (as identified by owner reference) will be deleted
  • Any deployed resources (Deployments, Services, ConfigMaps, etc) on the managed cluster, that were created from that Application resource (by Hanzo CD), will be deleted.
    • Hanzo CD is responsible for handling this deletion, via the deletion finalizer.
    • To preserve deployed resources, set .syncPolicy.preserveResourcesOnDeletion to true in the ApplicationSet.

Thus the lifecycle of the ApplicationSet, the Application, and the Application's resources, are equivalent.

Note

See also the controlling resource modification page for more information about how to prevent deletion or modification of Application resources by the ApplicationSet controller.

It is still possible to delete an ApplicationSet resource, while preventing Applications (and their deployed resources) from also being deleted, using a non-cascading delete:

kubectl delete ApplicationSet (NAME) --cascade=orphan

Warning

Even if using a non-cascaded delete, the resources-finalizer.cd.hanzo.ai is still specified on the Application. Thus, when the Application is deleted, all of its deployed resources will also be deleted. (The lifecycle of the Application, and its child objects, are still equivalent.)

To prevent the deletion of the resources of the Application, such as Services, Deployments, etc, set .syncPolicy.preserveResourcesOnDeletion to true in the ApplicationSet. This syncPolicy parameter prevents the finalizer from being added to the Application.