argo-cd/resource_customizations/logstash.k8s.elastic.co/Logstash/health.lua
fprovencherdrw 8f1f5c7234
feat(health): add Logstash resource customization (#22028)
Signed-off-by: Francis Provencher <fprovencher@drw.com>
2025-06-13 11:57:56 -04:00

20 lines
532 B
Lua

local hs = {}
if obj.status ~= nil and obj.status.health ~= nil then
if obj.status.health == "green" then
hs.status = "Healthy"
hs.message = "Logstash status is Green"
return hs
elseif obj.status.health == "yellow" then
hs.status = "Progressing"
hs.message = "Logstash status is Yellow"
return hs
elseif obj.status.health == "red" then
hs.status = "Degraded"
hs.message = "Logstash status is Red"
return hs
end
end
hs.status = "Progressing"
hs.message = "Waiting for Logstash"
return hs