github.com/argoproj/argo-cd/v2@v2.10.9/docs/user-guide/orphaned-resources.md (about)

     1  # Orphaned Resources Monitoring
     2  
     3  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
     4  orphaned resources, inspect/remove resources using Argo CD UI and generate a warning.
     5  
     6  The Orphaned Resources monitoring is enabled in [Project](projects.md) settings, 
     7  and the below is an example of enabling the feature using the AppProject custom resource.
     8  
     9  ```yaml
    10  kind: AppProject
    11  metadata:
    12    ...
    13  spec:
    14    ...
    15    orphanedResources:
    16      warn: true
    17  ...
    18  ```
    19  
    20  Once the feature is enabled, each project application which has any orphaned resources in its target namespace
    21  will get a warning. The orphaned resources can be located using the application details page:
    22  
    23  ![orphaned resources](../assets/orphaned-resources.png)
    24  
    25  When enabling the feature, you might want to consider disabling warning at first.
    26  
    27  ```yaml
    28  spec:
    29    orphanedResources:
    30      warn: false # Disable warning
    31  ```
    32  
    33  While warning disabled, application users can still view orphaned resources in the UI.
    34  
    35  ## Exceptions
    36  
    37  Not every resource in the Kubernetes cluster is controlled by the end user. Following resources are never considered as orphaned:
    38  
    39  * Namespaced resources denied in the project. Usually, such resources are managed by cluster administrators and not supposed to be modified by namespace user.
    40  * `ServiceAccount` with name `default` ( and corresponding auto-generated `ServiceAccountToken` ).
    41  * `Service` with name `kubernetes` in the `default` namespace.
    42  * `ConfigMap` with name `kube-root-ca.crt` in all namespaces.
    43  
    44  Also, you can configure to ignore resources by providing a list of resource Group, Kind and Name.
    45  
    46  ```yaml
    47  spec:
    48    orphanedResources:
    49      ignore:
    50      - kind: ConfigMap
    51        name: orphaned-but-ignored-configmap
    52  ```