mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
19 lines
488 B
Lua
19 lines
488 B
Lua
|
|
-- Status reporting information detailed here
|
||
|
|
-- https://projectcontour.io/docs/main/config/fundamentals/#status-reporting
|
||
|
|
hs = {
|
||
|
|
status = "Progressing",
|
||
|
|
message = "Waiting for status",
|
||
|
|
}
|
||
|
|
|
||
|
|
if obj.status ~= nil then
|
||
|
|
if obj.status.currentStatus ~= nil then
|
||
|
|
if obj.status.currentStatus == "valid" then
|
||
|
|
hs.status = "Healthy"
|
||
|
|
elseif obj.status.currentStatus == "invalid" then
|
||
|
|
hs.status = "Degraded"
|
||
|
|
end
|
||
|
|
hs.message = obj.status.description
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
return hs
|