Skip to content

Commit

Permalink
fix: Update documentation Argocd app CRD health with app of apps (#6281)
Browse files Browse the repository at this point in the history
fix: Update documentation Argocd app CRD health with app of apps (#6281)

Signed-off-by: LucasBoisserie <[email protected]>
  • Loading branch information
LucasBoisserie authored and alexmt committed Jun 4, 2021
1 parent 5ed2f71 commit 0310d4b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
34 changes: 34 additions & 0 deletions docs/operator-manual/health.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,40 @@ with at least one value for `hostname` or `IP`.
### PersistentVolumeClaim
* The `status.phase` is `Bound`

### Argocd App

The health assessement of `argoproj.io/Application` CRD has been removed in argocd 1.8 (see [#3781](https://github.com/argoproj/argo-cd/issues/3781) for more information).
You might need to restore it if you are using app-of-apps pattern and orchestrating syncronization using sync waves. Add the following resource customization in
`argocd-cm` ConfigMap:

```yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
labels:
app.kubernetes.io/name: argocd-cm
app.kubernetes.io/part-of: argocd
data:
resource.customizations: |
argoproj.io/Application:
health.lua: |
hs = {}
hs.status = "Progressing"
hs.message = ""
if obj.status ~= nil then
if obj.status.health ~= nil then
hs.status = obj.status.health.status
if obj.status.health.message ~= nil then
hs.message = obj.status.health.message
end
end
end
return hs
```
## Custom Health Checks
Argo CD supports custom health checks written in [Lua](https://www.lua.org/). This is useful if you:
Expand Down
6 changes: 4 additions & 2 deletions docs/operator-manual/upgrading/1.7-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ data:
argoproj.io/Application:
health.lua: |
hs = {}
hs.status = "Healthy"
hs.status = "Progressing"
hs.message = ""
if obj.status ~= nil then
if obj.status.health ~= nil then
hs.status = obj.status.health.status
hs.message = obj.status.health.message
if obj.status.health.message ~= nil then
hs.message = obj.status.health.message
end
end
end
return hs
Expand Down

0 comments on commit 0310d4b

Please sign in to comment.