mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-05 07:38:22 +00:00
* Adding Synergy as a ArgoCD user Signed-off-by: GitHub <noreply@github.com> * Health checking Kafka Connector resources Signed-off-by: Clint Chester <clint.chester@synergy.net.au> * Includes Kafka Connect Task Failures Signed-off-by: Clint Chester <clint.chester@synergy.net.au> --------- Signed-off-by: GitHub <noreply@github.com> Signed-off-by: Clint Chester <clint.chester@synergy.net.au>
25 lines
No EOL
944 B
Lua
25 lines
No EOL
944 B
Lua
hs = {}
|
|
if obj.status ~= nil and obj.status.state ~= nil then
|
|
if obj.status.state == "CREATED" and obj.status.connectorState == "RUNNING" and obj.status.failedTasksCount == nil then
|
|
hs.status = "Healthy"
|
|
hs.message = "Connector running"
|
|
return hs
|
|
end
|
|
if obj.status.state == "ERROR" then
|
|
hs.status = "Degraded"
|
|
if obj.status.conditions and #obj.status.conditions > 0 then
|
|
hs.message = obj.status.conditions[1].message -- Kafka Connector only has one condition and nests the issues in the error message here
|
|
else
|
|
hs.message = "No conditions available"
|
|
end
|
|
return hs
|
|
end
|
|
if obj.status.failedTasksCount ~= nil and obj.status.failedTasksCount > 0 then
|
|
hs.status = "Degraded"
|
|
hs.message = "Connector has failed tasks"
|
|
return hs
|
|
end
|
|
end
|
|
hs.status = "Progressing"
|
|
hs.message = "Waiting for Kafka Connector"
|
|
return hs |