mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-22 01:17: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>
31 lines
1.1 KiB
Lua
31 lines
1.1 KiB
Lua
-- healthcheck for IngressController resources
|
|
local hs = {}
|
|
if obj.status ~= nil then
|
|
if obj.status.conditions ~= nil then
|
|
-- if the status conditions are present, iterate over them and check their status
|
|
for _, condition in pairs(obj.status.conditions) do
|
|
if condition.type == "Degraded" and condition.status == "True" then
|
|
hs.status = "Degraded"
|
|
hs.message = condition.message
|
|
return hs
|
|
elseif condition.type == "DeploymentReplicasAllAvailable" and condition.status == "False" then
|
|
hs.status = "Progressing"
|
|
hs.message = condition.message
|
|
return hs
|
|
elseif condition.type == "Progressing" and condition.status == "True" then
|
|
hs.status = "Progressing"
|
|
hs.message = condition.reason
|
|
return hs
|
|
elseif condition.type == "Available" and condition.status == "True" then
|
|
hs.status = "Healthy"
|
|
hs.message = "IngressController is available"
|
|
return hs
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
-- default status when none of the previous condition matches
|
|
hs.status = "Progressing"
|
|
hs.message = "Status of IngressController is not known yet"
|
|
return hs
|