You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
5
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.
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.
8
8
9
9
```yaml
10
10
kind: AppProject
@@ -17,31 +17,33 @@ spec:
17
17
...
18
18
```
19
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:
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:
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.
26
26
27
27
```yaml
28
28
spec:
29
29
orphanedResources:
30
30
warn: false # Disable warning
31
31
```
32
32
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.
34
34
35
35
## Exceptions
36
36
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.
38
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.
39
+
The following resources are never considered orphaned:
43
40
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.
45
47
46
48
```yaml
47
49
spec:
@@ -50,3 +52,13 @@ spec:
50
52
- kind: ConfigMap
51
53
name: orphaned-but-ignored-configmap
52
54
```
55
+
56
+
The `name` can be a [glob pattern](https://github.com/gobwas/glob), e.g.:
0 commit comments