Orphaned Resources Monitoring

Orphaned Kubernetes resource is a top-level namespaced resource which does not belong to any Argo CD Application. The Orphaned Resources Monitoring feature allows detecting orphaned resources, inspect/remove resources using Argo CD UI and generate a warning.

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

  1. kind: AppProject
  2. metadata:
  3. ...
  4. spec:
  5. ...
  6. orphanedResources:
  7. warn: true
  8. ...

Once the feature is enabled, each project application which has any orphaned resources in its target namespace will get a warning. The orphaned resources can be located using the application details page:

orphaned resources

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

  1. spec:
  2. orphanedResources:
  3. warn: false # Disable warning

While warning 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. Following resources are never considered as orphaned:

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

Also, you can configure to ignore resources by providing a list of resource Group, Kind and Name.

  1. spec:
  2. orphanedResources:
  3. ignore:
  4. - kind: ConfigMap
  5. name: orphaned-but-ignored-configmap