Skip to content

Commit aeb451f

Browse files
committed
operator v1: do not "lose" error in some situations
this code may hide an error returned by ar.Ensure. we don't want that; the defer func around observedGeneration and OperatorQuiescent wants to see all errors.
1 parent 4e96b79 commit aeb451f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/go/k8s/internal/controller/redpanda/cluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func (r *ClusterReconciler) Reconcile(
228228
}
229229

230230
result, errs := ar.Ensure()
231-
if !result.IsZero() {
231+
if !result.IsZero() && errs == nil {
232232
return result, nil
233233
}
234234
if errs != nil {

0 commit comments

Comments
 (0)