argo-cd/resource_customizations/solr.apache.org/SolrCloud/health.lua
rezellme 19d85aa9fb
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 <rze@vizrt.com>

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

Signed-off-by: Remo Zellmer <rze@vizrt.com>

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

Signed-off-by: Remo Zellmer <rze@vizrt.com>

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

Signed-off-by: Remo Zellmer <rze@vizrt.com>

---------

Signed-off-by: Remo Zellmer <rze@vizrt.com>
2024-10-09 11:12:09 -04:00

24 lines
No EOL
565 B
Lua

-- There is no value in the manifest that can lead to conclude that
-- this resource is in a "Degraded" state. Update this, if in the future
-- this possibility arises.
if obj.status == nil or obj.status.solrNodes == nil then
return {
status = "Progressing",
message = "Waiting for solr to exist",
}
end
for _, solrNode in ipairs(obj.status.solrNodes) do
if not solrNode.ready then
return {
status = "Progressing",
message = "Not all replicas are ready",
}
end
end
return {
status = "Healthy",
message = "Solr is ready",
}