Skip to content

Commit

Permalink
Use IsStatusConditionTrue
Browse files Browse the repository at this point in the history
It is more direct.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
  • Loading branch information
toshipp committed Sep 17, 2024
1 parent 1dbde78 commit 8722052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/mantlebackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,10 @@ func (r *MantleBackupReconciler) createRBDSnapshotAndUpdateStatus(
}

// If the given MantleBackup is not ready to use, create a new RBD snapshot and update its status.
if cond := meta.FindStatusCondition(
if meta.IsStatusConditionTrue(
backup.Status.Conditions,
mantlev1.BackupConditionReadyToUse,
); cond != nil && cond.Status == metav1.ConditionTrue {
) {
return nil
}

Expand Down

0 comments on commit 8722052

Please sign in to comment.