fix: improves the Rabbit MQ resouce customization to better handle unknown conditions (#25941)

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
This commit is contained in:
Papapetrou Patroklos
2026-01-15 11:15:55 +02:00
committed by GitHub
parent b320854f04
commit 275c5de627
2 changed files with 9 additions and 6 deletions

View File

@@ -21,9 +21,12 @@ if obj.status ~= nil then
end
end
-- Treat transient/initial 'Unknown' condition as Progressing instead of Degraded.
-- The RabbitMQ operator sets these conditions to Unknown briefly while forming the cluster,
-- so mapping Unknown->Progressing prevents false Degraded states during normal reconciliation.
if clusterAvailable.status == "Unknown" or allReplicasReady.status == "Unknown" then
hs.status = "Degraded"
hs.message = "No statefulset or endpoints found"
hs.status = "Progressing"
hs.message = "Waiting for RabbitMQ cluster readiness (conditions unknown)"
return hs
end

View File

@@ -4,12 +4,12 @@ tests:
message: Unknown 'foo' parameter
inputPath: testdata/degraded_badconfig.yaml
- healthStatus:
status: Degraded
message: No statefulset or endpoints found
status: Progressing
message: Waiting for RabbitMQ cluster readiness (conditions unknown)
inputPath: testdata/degraded_cluster_unknown.yaml
- healthStatus:
status: Degraded
message: No statefulset or endpoints found
status: Progressing
message: Waiting for RabbitMQ cluster readiness (conditions unknown)
inputPath: testdata/degraded_replicas_unknown.yaml
- healthStatus:
status: Progressing