mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
* 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>
30 lines
No EOL
871 B
Lua
30 lines
No EOL
871 B
Lua
-- Waiting for status info => Progressing
|
|
if obj.status == nil or obj.status.PostgresClusterStatus == nil then
|
|
return {
|
|
status = "Progressing",
|
|
message = "Waiting for postgres cluster status...",
|
|
}
|
|
end
|
|
|
|
-- Running => Healthy
|
|
if obj.status.PostgresClusterStatus == "Running" then
|
|
return {
|
|
status = "Healthy",
|
|
message = obj.status.PostgresClusterStatus,
|
|
}
|
|
end
|
|
|
|
-- Creating/Updating => Progressing
|
|
if obj.status.PostgresClusterStatus == "Creating" or obj.status.PostgresClusterStatus == "Updating" then
|
|
return {
|
|
status = "Progressing",
|
|
message = obj.status.PostgresClusterStatus,
|
|
}
|
|
end
|
|
|
|
-- CreateFailed/UpdateFailed/SyncFailed/Invalid/etc => Degraded
|
|
-- See https://github.com/zalando/postgres-operator/blob/0745ce7c/pkg/apis/acid.zalan.do/v1/const.go#L4-L13
|
|
return {
|
|
status = "Degraded",
|
|
message = obj.status.PostgresClusterStatus,
|
|
} |