Skip to content

Commit

Permalink
docs: improve Orphaned Resources Monitoring with more examples and co…
Browse files Browse the repository at this point in the history
…rrect grammar (#6006)

Signed-off-by: Ryota <rytswd@gmail.com>
  • Loading branch information
rytswd authored Apr 13, 2021
1 parent 8301d39 commit 61080b3
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions docs/user-guide/orphaned-resources.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
# 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, generate a warning and inspect/remove resources using Argo CD UI.
orphaned resources, inspect/remove resources using Argo CD UI and generate a warning.

The Orphaned Resources monitoring is enabled in [Project](projects.md) settings. Once the feature is enabled each project application which target namespace has orphaned resource
will get a warning condition. The orphaned resources can be located using the application details page:
The Orphaned Resources monitoring is enabled in [Project](projects.md) settings,
and the below is an example of enabling the feature using the AppProject custom resource.

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

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](../assets/orphaned-resources.png)

Before enabling feature you might consider disabling warning. In this case application users are going to see orphaned resources in the UI but application is won't get a warning condition.
When enabling the feature, you might want to consider disabling warning at first.

```yaml
spec:
orphanedResources:
warn: false # Disable warning
```
While warning disabled, application users can still view orphaned resources in the UI.
## Exceptions
Expand All @@ -18,3 +40,13 @@ Not every resource in the Kubernetes cluster is controlled by the end user. Foll
* `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.

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

0 comments on commit 61080b3

Please sign in to comment.