diff --git a/content/knowledge-base/integrations/argo-cd-crossplane.md b/content/knowledge-base/integrations/argo-cd-crossplane.md index 9767832e6..a27fc7f6e 100644 --- a/content/knowledge-base/integrations/argo-cd-crossplane.md +++ b/content/knowledge-base/integrations/argo-cd-crossplane.md @@ -70,13 +70,13 @@ data: "ProviderConfigUsage" } - if obj.status == nil and contains(has_no_status, obj.kind) then + if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then health_status.status = "Healthy" health_status.message = "Resource is up-to-date." return health_status end - if obj.status == nil or obj.status.conditions == nil then + if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then if obj.kind == "ProviderConfig" and obj.status.users ~= nil then health_status.status = "Healthy" health_status.message = "Resource is in use." @@ -137,18 +137,18 @@ data: "ProviderConfig", "ProviderConfigUsage" } - if obj.status == nil and contains(has_no_status, obj.kind) then + if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then health_status.status = "Healthy" health_status.message = "Resource is up-to-date." return health_status end - if obj.status == nil or obj.status.conditions == nil then - if obj.kind == "ProviderConfig" and obj.status.users ~= nil then - health_status.status = "Healthy" - health_status.message = "Resource is in use." - return health_status - end + if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then + if obj.kind == "ProviderConfig" and obj.status.users ~= nil then + health_status.status = "Healthy" + health_status.message = "Resource is in use." + return health_status + end return health_status end