mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-28 04:17:17 +00:00
* Adding LexisNexis to USERS.md * Adding Istio healthcheck * Adding Jaeger healthcheck * Adding Kafka healthcheck * Adding Kiali healthcheck * Adding Knative healthchecks * Adding Spark Application healthcheck * Adding Zookeeper healthcheck
33 lines
No EOL
1.3 KiB
Lua
33 lines
No EOL
1.3 KiB
Lua
health_status = {}
|
|
if obj.status ~= nil then
|
|
if obj.status.status ~= nil then
|
|
if obj.status.status == 0 or obj.status.status == "NONE" then
|
|
health_status.status = "Unknown"
|
|
health_status.message = "Component is not present."
|
|
return health_status
|
|
end
|
|
if obj.status.status == 1 or obj.status.status == "UPDATING" then
|
|
health_status.status = "Progressing"
|
|
health_status.message = "Component is being updated to a different version."
|
|
return health_status
|
|
end
|
|
if obj.status.status == 2 or obj.status.status == "RECONCILING" then
|
|
health_status.status = "Progressing"
|
|
health_status.message = "Controller has started but not yet completed reconciliation loop for the component."
|
|
return health_status
|
|
end
|
|
if obj.status.status == 3 or obj.status.status == "HEALTHY" then
|
|
health_status.status = "Healthy"
|
|
health_status.message = "Component is healthy."
|
|
return health_status
|
|
end
|
|
if obj.status.status == 4 or obj.status.status == "ERROR" then
|
|
health_status.status = "Degraded"
|
|
health_status.message = "Component is in an error state."
|
|
return health_status
|
|
end
|
|
end
|
|
end
|
|
health_status.status = "Progressing"
|
|
health_status.message = "Waiting for Istio Control Plane"
|
|
return health_status |