argo-cd/resource_customizations/karpenter.k8s.aws/EC2NodeClass/health.lua
KoB 9472273a1b
feat(health-check): Add resource_customizations for karpenter (#23139)
Signed-off-by: 김병준 <kingbj0429@gmail.com>
2025-06-05 14:22:39 +00:00

19 lines
550 B
Lua

local hs = {}
if obj.status ~= nil and obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
if condition.type == "Ready" then
if condition.status == "False" then
hs.status = "Degraded"
hs.message = condition.message
return hs
elseif condition.status == "True" then
hs.status = "Healthy"
hs.message = "EC2NodeClass is ready"
return hs
end
end
end
end
hs.status = "Progressing"
hs.message = "Waiting for EC2NodeClass to be ready"
return hs