Files
rezellmeandGitHub 9e3f529d1e feat(health): Adding more health checks for Keycloak, Postgres, Grafana, SolrCloud (#20294)
* feat(health): Add healtchcheck for acid.zalan.do/postgresql

Signed-off-by: Remo Zellmer <[email protected]>

* feat(health): Add healthcheck for grafana.integreatly.org/Grafana and GrafanaDatasource

Signed-off-by: Remo Zellmer <[email protected]>

* feat(health): Add healthcheck for k8s.keycloak.org/Keycloak

Signed-off-by: Remo Zellmer <[email protected]>

* feat(health): Add healthcheck for solr.apache.org/SolrCloud

Signed-off-by: Remo Zellmer <[email protected]>

---------

Signed-off-by: Remo Zellmer <[email protected]>
2024-10-09 11:12:09 -04:00

30 lines
725 B
Lua

-- if no status info available yet, assume progressing
if obj.status == nil or obj.status.stageStatus == nil then
return {
status = "Progressing",
message = "Waiting for Grafana status info",
}
end
-- if last stage failed, we are stuck here
if obj.status.stageStatus == "failed" then
return {
status = "Degraded",
message = "Failed at stage " .. obj.status.stage,
}
end
-- only if "complete" stage was successful, Grafana can be considered healthy
if obj.status.stage == "complete" and obj.status.stageStatus == "success" then
return {
status = "Healthy",
message = "",
}
end
-- no final status yet, assume progressing
return {
status = "Progressing",
message = obj.status.stage,
}