Skip to content

Commit 535851e

Browse files
feat: change logger
1 parent cc9cc6a commit 535851e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

controllers/reconcile_scale_zero.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (r *RabbitmqClusterReconciler) scaleFromZeroToBeforeReplicasConfigured(ctx
5151
return true
5252
}
5353
if desiredReplicas != int32(beforeZeroReplicas) {
54-
msg := fmt.Sprintf("Cluster Scale from zero to other replicas than before configured not supported; tried to scale cluster from %d nodes to %d nodes", int32(beforeZeroReplicas), desiredReplicas)
54+
msg := fmt.Sprintf("Unsupported operation; when scaling from zero, you can only restore the previous number of replicas (%d)", int32(beforeZeroReplicas))
5555
reason := "UnsupportedOperation"
5656
err = r.recordEventsAndSetCondition(ctx, cluster, status.ReconcileSuccess, corev1.ConditionFalse, corev1.EventTypeWarning, reason, msg)
5757
if err != nil {

controllers/reconcile_scale_zero_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ var _ = Describe("Cluster scale from zero to less replicas configured", Ordered,
202202

203203
By("setting 'Warning' events", func() {
204204
Expect(aggregateEventMsgs(ctx, cluster, "UnsupportedOperation")).To(
205-
ContainSubstring("Cluster Scale from zero to other replicas than before configured not supported"))
205+
ContainSubstring("Unsupported operation"))
206206
})
207207

208208
By("setting ReconcileSuccess to 'false'", func() {
@@ -225,7 +225,7 @@ var _ = Describe("Cluster scale from zero to less replicas configured", Ordered,
225225
return "ReconcileSuccess status: condition not present"
226226
}, 0).Should(Equal("ReconcileSuccess status: False, " +
227227
"with reason: UnsupportedOperation " +
228-
"and message: Cluster Scale from zero to other replicas than before configured not supported; tried to scale cluster from 2 nodes to 1 nodes"))
228+
"and message: Unsupported operation; when scaling from zero, you can only restore the previous number of replicas (1)"))
229229
})
230230
})
231231
})

0 commit comments

Comments
 (0)