Skip to content

Commit

Permalink
DEVOPS-30441: fix resource status check
Browse files Browse the repository at this point in the history
  • Loading branch information
bfabricio committed Dec 31, 2024
1 parent ec8cfac commit 5c0720d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/databaseclaim/databaseclaim.go
Original file line number Diff line number Diff line change
Expand Up @@ -1039,10 +1039,11 @@ func (r *DatabaseClaimReconciler) getPasswordRotationTime() time.Duration {

// FindStatusCondition finds the conditionType in conditions.
func (r *DatabaseClaimReconciler) isResourceReady(typ, name string, resourceStatus xpv1.ResourceStatus) (bool, error) {
if ok, err := isResourceReady(resourceStatus); err != nil {
return ok, fmt.Errorf("%s %s: %w", typ, name, err)
ok, err := isResourceReady(resourceStatus)
if err != nil {
return false, fmt.Errorf("%s %s: %w", typ, name, err)
}
return true, nil
return ok, nil
}

func isResourceReady(resourceStatus xpv1.ResourceStatus) (bool, error) {
Expand Down

0 comments on commit 5c0720d

Please sign in to comment.