mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-04 07:08:19 +00:00
Add additional strimzi custom resource health checks, including: * Kafka * KafkaTopic * KafkaUser Contributes to argoproj/argo-cd#5577 Signed-off-by: Nick Groszewski <groszewn@gmail.com>
21 lines
549 B
Lua
21 lines
549 B
Lua
hs = {}
|
|
if obj.status ~= nil then
|
|
if obj.status.conditions ~= nil then
|
|
for i, condition in ipairs(obj.status.conditions) do
|
|
if condition.type == "NotReady" and condition.status == "True" then
|
|
hs.status = "Degraded"
|
|
hs.message = condition.message
|
|
return hs
|
|
end
|
|
if condition.type == "Ready" and condition.status == "True" then
|
|
hs.status = "Healthy"
|
|
hs.message = ""
|
|
return hs
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
hs.status = "Progressing"
|
|
hs.message = "Waiting for Kafka Topic"
|
|
return hs
|