argo-cd/resource_customizations/install.istio.io/IstioOperator/health.lua
whitleykeith b79db51340
feat: Added healthchecks for more custom resources (#3726) (#3728)
* Adding LexisNexis to USERS.md

* Adding Istio healthcheck

* Adding Jaeger healthcheck

* Adding Kafka healthcheck

* Adding Kiali healthcheck

* Adding Knative healthchecks

* Adding Spark Application healthcheck

* Adding Zookeeper  healthcheck
2020-06-12 09:51:13 -07:00

33 lines
No EOL
1.3 KiB
Lua

health_status = {}
if obj.status ~= nil then
if obj.status.status ~= nil then
if obj.status.status == 0 or obj.status.status == "NONE" then
health_status.status = "Unknown"
health_status.message = "Component is not present."
return health_status
end
if obj.status.status == 1 or obj.status.status == "UPDATING" then
health_status.status = "Progressing"
health_status.message = "Component is being updated to a different version."
return health_status
end
if obj.status.status == 2 or obj.status.status == "RECONCILING" then
health_status.status = "Progressing"
health_status.message = "Controller has started but not yet completed reconciliation loop for the component."
return health_status
end
if obj.status.status == 3 or obj.status.status == "HEALTHY" then
health_status.status = "Healthy"
health_status.message = "Component is healthy."
return health_status
end
if obj.status.status == 4 or obj.status.status == "ERROR" then
health_status.status = "Degraded"
health_status.message = "Component is in an error state."
return health_status
end
end
end
health_status.status = "Progressing"
health_status.message = "Waiting for Istio Control Plane"
return health_status