From c741d04eedd273b1d65ee168ccb4d036be9585a3 Mon Sep 17 00:00:00 2001 From: Yury Tsarev Date: Mon, 11 May 2026 13:06:47 +0200 Subject: [PATCH] docs: argocd healthcheck - mark packages Degraded when Installed=False Crossplane packages (Function, Provider, Configuration) expose two status conditions: `Installed` (the package spec resolved and was unpacked) and `Healthy` (the active PackageRevision is healthy). When `spec.package` is changed to a tag that cannot be resolved or unpacked, the new generation reports `Installed=False` (reason: `UnpackingPackage`, `InvalidPackageRevisionSpec`, ...), but the previously active revision continues to report `Healthy=True / HealthyPackageRevision` with a stale `observedGeneration`. The Lua healthcheck only matched positive condition types and therefore stamped the package as Healthy in ArgoCD even though the GitOps change had failed to roll out. Add an explicit branch that early-returns Degraded when an `Installed` condition is False, mirroring the existing handling for `Synced` and `LastAsyncOperation`. The new branch is a no-op for non-package kinds and for the steady-state `Installed=True / ActivePackageRevision` case. Signed-off-by: Yury Tsarev --- content/master/guides/crossplane-with-argo-cd.md | 8 ++++++++ content/v1.20/guides/crossplane-with-argo-cd.md | 8 ++++++++ content/v2.0-preview/guides/crossplane-with-argo-cd.md | 8 ++++++++ content/v2.0/guides/crossplane-with-argo-cd.md | 8 ++++++++ content/v2.1/guides/crossplane-with-argo-cd.md | 8 ++++++++ content/v2.2/guides/crossplane-with-argo-cd.md | 8 ++++++++ 6 files changed, 48 insertions(+) diff --git a/content/master/guides/crossplane-with-argo-cd.md b/content/master/guides/crossplane-with-argo-cd.md index 928ef9f67..bf0e8fdde 100644 --- a/content/master/guides/crossplane-with-argo-cd.md +++ b/content/master/guides/crossplane-with-argo-cd.md @@ -174,6 +174,14 @@ data: end end + if condition.type == "Installed" then + if condition.status == "False" then + health_status.status = "Degraded" + health_status.message = condition.message + return health_status + end + end + if contains({"Ready", "Healthy", "Offered", "Established", "ValidPipeline", "RevisionHealthy"}, condition.type) then if condition.status == "True" then health_status.status = "Healthy" diff --git a/content/v1.20/guides/crossplane-with-argo-cd.md b/content/v1.20/guides/crossplane-with-argo-cd.md index 23fd31db8..26c330693 100644 --- a/content/v1.20/guides/crossplane-with-argo-cd.md +++ b/content/v1.20/guides/crossplane-with-argo-cd.md @@ -168,6 +168,14 @@ data: end end + if condition.type == "Installed" then + if condition.status == "False" then + health_status.status = "Degraded" + health_status.message = condition.message + return health_status + end + end + if contains({"Ready", "Healthy", "Offered", "Established"}, condition.type) then if condition.status == "True" then health_status.status = "Healthy" diff --git a/content/v2.0-preview/guides/crossplane-with-argo-cd.md b/content/v2.0-preview/guides/crossplane-with-argo-cd.md index 920a3daa8..f7839c62d 100644 --- a/content/v2.0-preview/guides/crossplane-with-argo-cd.md +++ b/content/v2.0-preview/guides/crossplane-with-argo-cd.md @@ -167,6 +167,14 @@ data: end end + if condition.type == "Installed" then + if condition.status == "False" then + health_status.status = "Degraded" + health_status.message = condition.message + return health_status + end + end + if contains({"Ready", "Healthy", "Offered", "Established"}, condition.type) then if condition.status == "True" then health_status.status = "Healthy" diff --git a/content/v2.0/guides/crossplane-with-argo-cd.md b/content/v2.0/guides/crossplane-with-argo-cd.md index 928ef9f67..bf0e8fdde 100644 --- a/content/v2.0/guides/crossplane-with-argo-cd.md +++ b/content/v2.0/guides/crossplane-with-argo-cd.md @@ -174,6 +174,14 @@ data: end end + if condition.type == "Installed" then + if condition.status == "False" then + health_status.status = "Degraded" + health_status.message = condition.message + return health_status + end + end + if contains({"Ready", "Healthy", "Offered", "Established", "ValidPipeline", "RevisionHealthy"}, condition.type) then if condition.status == "True" then health_status.status = "Healthy" diff --git a/content/v2.1/guides/crossplane-with-argo-cd.md b/content/v2.1/guides/crossplane-with-argo-cd.md index 928ef9f67..bf0e8fdde 100644 --- a/content/v2.1/guides/crossplane-with-argo-cd.md +++ b/content/v2.1/guides/crossplane-with-argo-cd.md @@ -174,6 +174,14 @@ data: end end + if condition.type == "Installed" then + if condition.status == "False" then + health_status.status = "Degraded" + health_status.message = condition.message + return health_status + end + end + if contains({"Ready", "Healthy", "Offered", "Established", "ValidPipeline", "RevisionHealthy"}, condition.type) then if condition.status == "True" then health_status.status = "Healthy" diff --git a/content/v2.2/guides/crossplane-with-argo-cd.md b/content/v2.2/guides/crossplane-with-argo-cd.md index 928ef9f67..bf0e8fdde 100644 --- a/content/v2.2/guides/crossplane-with-argo-cd.md +++ b/content/v2.2/guides/crossplane-with-argo-cd.md @@ -174,6 +174,14 @@ data: end end + if condition.type == "Installed" then + if condition.status == "False" then + health_status.status = "Degraded" + health_status.message = condition.message + return health_status + end + end + if contains({"Ready", "Healthy", "Offered", "Established", "ValidPipeline", "RevisionHealthy"}, condition.type) then if condition.status == "True" then health_status.status = "Healthy"