Files
deploy/docs/user-guide/orphaned-resources.md
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.6 KiB

Orphaned Resources Monitoring

!!! warning

Enabling orphaned resource monitoring has performance implications. If an AppProject monitors a namespace containing many resources not managed by Hanzo CD (e.g. `kube-system`), it can significantly impact your Hanzo CD instance. Enable this feature only on projects with well-scoped namespaces.

An orphaned Kubernetes resource is a top-level namespaced resource that does not belong to any Hanzo CD Application. The Orphaned Resources Monitoring feature allows detecting orphaned resources, inspecting/removing resources using the Hanzo CD UI, and generating a warning.

The Orphaned Resources monitoring is enabled in the Project settings. Below is an example of enabling the feature using the AppProject custom resource.

kind: AppProject
metadata:
  ...
spec:
  ...
  orphanedResources:
    warn: true
...

Once the feature is enabled, each project application that has any orphaned resources in its target namespace will get a warning. The orphaned resources can be located using the application details page by enabling the "Show Orphaned" filter:

orphaned resources

When enabling the feature, you might want to consider disabling warnings at first.

spec:
  orphanedResources:
    warn: false # Disable warning

When warnings are disabled, application users can still view orphaned resources in the UI.

Exceptions

Not every resource in the Kubernetes cluster is controlled by the end user and managed by Hanzo CD. Other operators in the cluster can automatically create resources (e.g., the cert-manager creating secrets), which are then considered orphaned.

The following resources are never considered orphaned:

  • Namespaced resources denied in the project. Usually, such resources are managed by cluster administrators and are not supposed to be modified by a namespace user.
  • ServiceAccount with the name default (and the corresponding auto-generated ServiceAccountToken).
  • Service with the name kubernetes in the default namespace.
  • ConfigMap with the name kube-root-ca.crt in all namespaces.

You can prevent resources from being declared orphaned by providing a list of ignore rules, each defining a Group, Kind, and Name.

spec:
  orphanedResources:
    ignore:
      - kind: ConfigMap
        name: orphaned-but-ignored-configmap

The name can be a glob pattern, e.g.:

spec:
  orphanedResources:
    ignore:
    - kind: Secret
      name: *.example.com