mirror of https://github.com/crossplane/docs.git
Update argo-cd health check ConfigMap to account for changes in Crossplane v2 resource statuses
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
This commit is contained in:
parent
8bae31a12a
commit
709889c5db
|
|
@ -71,6 +71,7 @@ data:
|
||||||
end
|
end
|
||||||
|
|
||||||
local has_no_status = {
|
local has_no_status = {
|
||||||
|
"ClusterProviderConfig",
|
||||||
"ProviderConfig",
|
"ProviderConfig",
|
||||||
"ProviderConfigUsage"
|
"ProviderConfigUsage"
|
||||||
}
|
}
|
||||||
|
|
@ -82,7 +83,7 @@ data:
|
||||||
end
|
end
|
||||||
|
|
||||||
if obj.status == nil or next(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
|
if (obj.kind == "ProviderConfig" or obj.kind == "ClusterProviderConfig") and obj.status.users ~= nil then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is in use."
|
health_status.message = "Resource is in use."
|
||||||
return health_status
|
return health_status
|
||||||
|
|
@ -138,6 +139,7 @@ data:
|
||||||
"Composition",
|
"Composition",
|
||||||
"CompositionRevision",
|
"CompositionRevision",
|
||||||
"DeploymentRuntimeConfig",
|
"DeploymentRuntimeConfig",
|
||||||
|
"ClusterProviderConfig",
|
||||||
"ProviderConfig",
|
"ProviderConfig",
|
||||||
"ProviderConfigUsage"
|
"ProviderConfigUsage"
|
||||||
}
|
}
|
||||||
|
|
@ -148,7 +150,7 @@ data:
|
||||||
end
|
end
|
||||||
|
|
||||||
if obj.status == nil or next(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
|
if (obj.kind == "ProviderConfig" or obj.kind == "ClusterProviderConfig") and obj.status.users ~= nil then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is in use."
|
health_status.message = "Resource is in use."
|
||||||
return health_status
|
return health_status
|
||||||
|
|
@ -173,7 +175,7 @@ data:
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if contains({"Ready", "Healthy", "Offered", "Established"}, condition.type) then
|
if contains({"Ready", "Healthy", "Offered", "Established", "ValidPipeline", "RevisionHealthy"}, condition.type) then
|
||||||
if condition.status == "True" then
|
if condition.status == "True" then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is up-to-date."
|
health_status.message = "Resource is up-to-date."
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ data:
|
||||||
end
|
end
|
||||||
|
|
||||||
local has_no_status = {
|
local has_no_status = {
|
||||||
|
"ClusterProviderConfig",
|
||||||
"ProviderConfig",
|
"ProviderConfig",
|
||||||
"ProviderConfigUsage"
|
"ProviderConfigUsage"
|
||||||
}
|
}
|
||||||
|
|
@ -82,7 +83,7 @@ data:
|
||||||
end
|
end
|
||||||
|
|
||||||
if obj.status == nil or next(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
|
if (obj.kind == "ProviderConfig" or obj.kind == "ClusterProviderConfig") and obj.status.users ~= nil then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is in use."
|
health_status.message = "Resource is in use."
|
||||||
return health_status
|
return health_status
|
||||||
|
|
@ -138,6 +139,7 @@ data:
|
||||||
"Composition",
|
"Composition",
|
||||||
"CompositionRevision",
|
"CompositionRevision",
|
||||||
"DeploymentRuntimeConfig",
|
"DeploymentRuntimeConfig",
|
||||||
|
"ClusterProviderConfig",
|
||||||
"ProviderConfig",
|
"ProviderConfig",
|
||||||
"ProviderConfigUsage"
|
"ProviderConfigUsage"
|
||||||
}
|
}
|
||||||
|
|
@ -148,7 +150,7 @@ data:
|
||||||
end
|
end
|
||||||
|
|
||||||
if obj.status == nil or next(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
|
if (obj.kind == "ProviderConfig" or obj.kind == "ClusterProviderConfig") and obj.status.users ~= nil then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is in use."
|
health_status.message = "Resource is in use."
|
||||||
return health_status
|
return health_status
|
||||||
|
|
@ -173,7 +175,7 @@ data:
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if contains({"Ready", "Healthy", "Offered", "Established"}, condition.type) then
|
if contains({"Ready", "Healthy", "Offered", "Established", "ValidPipeline", "RevisionHealthy"}, condition.type) then
|
||||||
if condition.status == "True" then
|
if condition.status == "True" then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is up-to-date."
|
health_status.message = "Resource is up-to-date."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue