mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
* chore(action): add newlines at eof Signed-off-by: Josh Soref <jsoref@gmail.com> * chore(action): fix whitespace indentation Signed-off-by: Josh Soref <jsoref@gmail.com> * chore(action): use local annotations Signed-off-by: Josh Soref <jsoref@gmail.com> --------- Signed-off-by: Josh Soref <jsoref@gmail.com>
33 lines
No EOL
1.3 KiB
Lua
33 lines
No EOL
1.3 KiB
Lua
local 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 |