Skip to content

Commit f953976

Browse files
ractivenitishfy
andauthored
docs: enhance orphaned resources documentation (#24243)
Signed-off-by: Jean-Pierre Bergamin <[email protected]> Co-authored-by: Nitish Kumar <[email protected]>
1 parent 26b970b commit f953976

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

docs/user-guide/orphaned-resources.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Orphaned Resources Monitoring
22

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.
3+
An [orphaned Kubernetes resource](https://kubernetes.io/docs/concepts/architecture/garbage-collection/#orphaned-dependents) is a top-level namespaced resource that does not belong to any Argo CD Application. The Orphaned Resources Monitoring feature allows detecting
4+
orphaned resources, inspecting/removing resources using the Argo CD UI, and generating a warning.
55

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.
6+
The Orphaned Resources monitoring is enabled in the [Project](projects.md) settings.
7+
Below is an example of enabling the feature using the AppProject custom resource.
88

99
```yaml
1010
kind: AppProject
@@ -17,31 +17,33 @@ spec:
1717
...
1818
```
1919

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:
20+
Once the feature is enabled, each project application that has any orphaned resources in its target namespace
21+
will get a warning. The orphaned resources can be located using the application details page by enabling the "Show Orphaned" filter:
2222

2323
![orphaned resources](../assets/orphaned-resources.png)
2424

25-
When enabling the feature, you might want to consider disabling warning at first.
25+
When enabling the feature, you might want to consider disabling warnings at first.
2626

2727
```yaml
2828
spec:
2929
orphanedResources:
3030
warn: false # Disable warning
3131
```
3232
33-
While warning disabled, application users can still view orphaned resources in the UI.
33+
When warnings are disabled, application users can still view orphaned resources in the UI.
3434
3535
## Exceptions
3636
37-
Not every resource in the Kubernetes cluster is controlled by the end user. Following resources are never considered as orphaned:
37+
Not every resource in the Kubernetes cluster is controlled by the end user and managed by Argo CD. Other operators in the cluster can automatically create resources (e.g., the cert-manager creating secrets), which are then considered orphaned.
3838
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.
39+
The following resources are never considered orphaned:
4340
44-
Also, you can configure to ignore resources by providing a list of resource Group, Kind and Name.
41+
* 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.
42+
* `ServiceAccount` with the name `default` (and the corresponding auto-generated `ServiceAccountToken`).
43+
* `Service` with the name `kubernetes` in the `default` namespace.
44+
* `ConfigMap` with the name `kube-root-ca.crt` in all namespaces.
45+
46+
You can prevent resources from being declared orphaned by providing a list of ignore rules, each defining a Group, Kind, and Name.
4547

4648
```yaml
4749
spec:
@@ -50,3 +52,13 @@ spec:
5052
- kind: ConfigMap
5153
name: orphaned-but-ignored-configmap
5254
```
55+
56+
The `name` can be a [glob pattern](https://github.com/gobwas/glob), e.g.:
57+
58+
```yaml
59+
spec:
60+
orphanedResources:
61+
ignore:
62+
- kind: Secret
63+
name: *.example.com
64+
```

0 commit comments

Comments
 (0)