A Synced, Healthy Application shows a warning:
Application has 7 orphaned resources
Nothing is broken, nothing needs fixing, and the line is going to stay there. That is orphaned resource detection behaving normally, and the first thing to understand is what it actually counts — because it is almost never what people assume.
What the feature looks at
An orphaned resource, in Argo CD’s vocabulary, is a top-level namespaced resource that belongs to no Argo CD Application. Each of those three terms removes something from the scope.
Namespaced: cluster-scoped objects are never candidates. A ClusterRole, a ValidatingWebhookConfiguration or a StorageClass created by hand will never be reported, whatever the setting.
Top-level: the controller only keeps objects without ownerReferences. A ReplicaSet created by an orphaned Deployment is not counted separately; you see the parent, not its descendants. Same for a Job created by a CronJob.
Belongs to no Application: attribution goes through the tracking method configured on the instance — the argocd.argoproj.io/tracking-id annotation by default, or the app.kubernetes.io/instance label in label mode. That is a concrete weak spot: a resource whose tracking marker was overwritten by another tool — several Helm charts and operators write that same label — becomes orphaned in Argo CD’s eyes even though the repository declares it.
That leaves the narrowest limit, and the one least present in people’s mental model: the controller only sweeps the Application’s destination namespace. Not the cluster, not the other namespaces the Application deploys into. An Application pushing into three namespaces takes inventory of exactly one.
It is enabled on the project, not the Application
The setting lives on the AppProject, so it covers every Application in that project.
apiVersion: argoproj.io/v1alpha1
kind: AppProject
spec:
orphanedResources:
warn: true
warn: true produces the warning. warn: false enables detection without it: orphans stay visible in the UI through the Show Orphaned filter, but no condition is set on the Application. The documentation explicitly recommends starting there, and it is good advice.
A warning comes with an OrphanedResourceWarning condition on the Application, and a metric exported by the controller:
argocd_app_orphaned_resources_count
That metric is what makes the feature useful outside the UI: it gives a number per Application, therefore a derivative. A flat seven teaches nothing; going from seven to forty in a day says something created objects outside the repository.
Why it is noisy by default
Not everything living in a namespace is supposed to come from Git. Operators create objects for their own purposes — a certificate manager materialising a Secret, a controller writing a working ConfigMap — and those objects, belonging to no Application, are counted as orphans.
Argo CD excludes four families out of the box, and the list is short:
- namespaced resources denied by the project — listed in
namespaceResourceBlacklist, or missing from a restrictivenamespaceResourceWhitelist— on the grounds that they are cluster administration, not the namespace user’s business; - the
ServiceAccountnameddefault, and its auto-generated token; - the
Servicenamedkubernetesin thedefaultnamespace; - the
kube-root-ca.crtConfigMap, in every namespace.
Everything else is declared by hand, as rules combining group, kind and name:
spec:
orphanedResources:
ignore:
- kind: ConfigMap
name: orphaned-but-ignored-configmap
# The name accepts a glob pattern
- kind: Secret
name: '*.example.com'
The name accepts a glob pattern, as do the group and kind. An empty kind or name means “any”. This is the way out of the noise: one rule per operator that produces objects, written once, and the warning becomes a signal again.
The cost, which is not zero
The warning in the documentation deserves to be taken literally: enabling detection on a project whose Applications target a namespace full of unmanaged resources — a system namespace, typically — measurably affects the Argo CD instance. The controller has to enumerate and watch the whole content of the namespace, not just what the repository declares, and that feeds the live state cache on every refresh.
That is why it is enabled project by project, on projects with well-scoped namespaces, rather than globally “in case it helps”.
What it does not tell you
Four silences, and they decide what the feature can be used for.
It changes nothing about sync status. An Application with fifty orphans stays Synced. The condition is a warning, not a health state: it blocks no sync, triggers no reconciliation, does nothing beyond displaying a count.
It does not tell you where the object came from. An orphan can be a leftover from a deleted Application, an object created by an operator, an emergency kubectl apply never carried back into the repository, or a perfectly legitimate resource whose tracking marker got lost. The controller does not distinguish those cases — sorting them out is a reading exercise.
It does not cover anything cluster-scoped, which is exactly the category of objects people create by hand under pressure and then forget: roles, webhooks, CustomResourceDefinition. The most expensive kind of drift is out of scope.
It is not a replacement for pruning. An orphan is never deleted automatically; the UI lets you remove them by hand, one at a time. What disappears on its own are the resources an Application stopped declaring, and only if prune is enabled — two distinct mechanisms, easily confused because both deal with objects that are “extra”.
Once those limits are on the table, the remaining use is narrower than the promise but real: on namespaces dedicated to a single Application, with an ignore list kept up to date, the orphan count is a discipline indicator. It does not measure the state of the cluster; it measures the gap between what the repository declares and what somebody ended up creating another way — the same question raised by splitting Applications at scale, and one the rest of the CI/CD chain has to settle upstream.