mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-30 14:56:59 +00:00
* 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]>
30 lines
725 B
Lua
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,
|
|
} |