Skip to content

Commit 93b8c3e

Browse files
committed
fix(operator): swap top-level update for status update
For some reason the top-level update call was allowing updates to Operator CR status subresources when its CRD was submitted as v1beta1. Status updates broke as soon as we updated to v1 CRDs and the status specific update became required.
1 parent 4e00700 commit 93b8c3e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/controller/operators/operator_controller.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,11 @@ func (r *OperatorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
161161

162162
}
163163

164-
if err := r.Update(ctx, operator.Operator); err != nil {
164+
if err := r.Status().Update(ctx, operator.Operator); err != nil {
165165
log.Error(err, "Could not update Operator status")
166166
return ctrl.Result{}, err
167167
}
168168

169-
if err := r.Get(ctx, req.NamespacedName, operator.Operator); err != nil {
170-
return ctrl.Result{}, err
171-
}
172-
173169
return ctrl.Result{}, nil
174170
}
175171

0 commit comments

Comments
 (0)