Skip to content

Commit

Permalink
do not show err log when deletion of cluster
Browse files Browse the repository at this point in the history
Signed-off-by: YZ775 <yuzuki-mimura@cybozu.co.jp>
  • Loading branch information
YZ775 committed Aug 23, 2023
1 parent f4a7566 commit 482edb0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions controllers/mysqlcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,11 @@ func (r *MySQLClusterReconciler) reconcileV1(ctx context.Context, req ctrl.Reque
log := crlog.FromContext(ctx)

defer func() {
if err2 := r.updateStatus(ctx, cluster, err); err2 != nil {
err = err2
log.Error(err2, "failed to update status")
if cluster.DeletionTimestamp == nil {
if err2 := r.updateStatus(ctx, cluster, err); err2 != nil {
err = err2
log.Error(err2, "failed to update status")
}
}
}()

Expand Down

0 comments on commit 482edb0

Please sign in to comment.