github.com/argoproj/argo-cd/v3@v3.2.1/resource_customizations/platform.confluent.io/Connector/health.lua (about) 1 hs = {} 2 if obj.status ~= nil and obj.status.state ~= nil then 3 if obj.status.state == "CREATED" and obj.status.connectorState == "RUNNING" and obj.status.failedTasksCount == nil then 4 hs.status = "Healthy" 5 hs.message = "Connector running" 6 return hs 7 end 8 if obj.status.state == "ERROR" then 9 hs.status = "Degraded" 10 if obj.status.conditions and #obj.status.conditions > 0 then 11 hs.message = obj.status.conditions[1].message -- Kafka Connector only has one condition and nests the issues in the error message here 12 else 13 hs.message = "No conditions available" 14 end 15 return hs 16 end 17 if obj.status.failedTasksCount ~= nil and obj.status.failedTasksCount > 0 then 18 hs.status = "Degraded" 19 hs.message = "Connector has failed tasks" 20 return hs 21 end 22 end 23 hs.status = "Progressing" 24 hs.message = "Waiting for Kafka Connector" 25 return hs