Skip to content

Commit

Permalink
Fix error handling of status controller
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed Apr 13, 2020
1 parent d3cb092 commit e43e3d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/operator/status/status_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ func (c StatusSyncer) Sync(ctx context.Context, syncCtx factory.SyncContext) err
if equality.Semantic.DeepEqual(clusterOperatorObj, originalClusterOperatorObj) {
return nil
}
if _, updateErr := c.clusterOperatorClient.ClusterOperators().UpdateStatus(ctx, clusterOperatorObj, metav1.UpdateOptions{}); err != nil {
return updateErr
if _, err := c.clusterOperatorClient.ClusterOperators().UpdateStatus(ctx, clusterOperatorObj, metav1.UpdateOptions{}); err != nil {
return err
}
syncCtx.Recorder().Eventf("OperatorStatusChanged", "Status for operator %s changed: %s", c.clusterOperatorName, configv1helpers.GetStatusDiff(originalClusterOperatorObj.Status, clusterOperatorObj.Status))
return nil
Expand Down

0 comments on commit e43e3d5

Please sign in to comment.