Skip to content

Commit

Permalink
write more better
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
crenshaw-dev committed Oct 3, 2023
1 parent 27a5d19 commit f9fd997
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions docs/operator-manual/health.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,25 +174,32 @@ The [PR#1139](https://github.com/argoproj/argo-cd/pull/1139) is an example of Ce

Please note that bundled health checks with wildcards are not supported.

## Health Check Inheritance Rules
## Health Checks

An Argo CD App's health is inferred from the health of its immediate child resources. In other words, it is inherited
from the health of the resources which are represented in the App's source.
An Argo CD App's health is inferred from the health of its immediate child resources (the resources represented in
source control).

The health of a child resource's children may or may not affect the health of the child resource. For example, an
unhealthy Pod might not mean that the parent Deployment is unhealthy.
But the health of a resource is not inherited from child resources - it is calculated using only information about the
resource itself. A resource's status field may or may not contain information about the health of a child resource, and
the resource's health check may or may not take that information into account.

The lack of inheritance is by design. A resource's health can't be inferred from its children because the health of a
child resource may not be relevant to the health of the parent resource. For example, a Deployment's health is not
necessarily affected by the health of its Pods.

```
App (healthy)
└── Deployment (healthy)
└── ReplicaSet (healthy)
└── Pod (healthy)
└── ReplicaSet (unhealthy)
└── Pod (unhealthy)
```
If you want the health of a child-of-a-child resource to affect the health of the child resource, you can write a
custom health check for the child resource. The key prerequisite is that the health check must be for an immediate child
of the app. A custom health check for the child-of-a-child resource will not be enough to cause the app to be marked
unhealthy.
If you want the health of a child resource to affect the health of its parent, you need to configure the parent's health
check to take the child's health into account. Since only the parent resource's state is available to the health check,
the parent resource's controller needs to make the child resource's health available in the parent resource's status
field.
```
App (healthy)
Expand Down

0 comments on commit f9fd997

Please sign in to comment.