Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ukff committed Dec 19, 2024
1 parent 586a89e commit 304c09f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/btpoperator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ func (r *BtpOperatorReconciler) checkResourceReadiness(ctx context.Context, u *u
case deploymentKind:
r.checkDeploymentReadiness(ctx, u, c)
default:
r.checkResourceExistence(ctx, u, c, ReadyTimeout)
r.checkResourceExistence(ctx, u, c)
}
}

Expand Down Expand Up @@ -697,7 +697,7 @@ func (r *BtpOperatorReconciler) checkDeploymentReadiness(ctx context.Context, u
}
}

func (r *BtpOperatorReconciler) checkResourceExistence(ctx context.Context, u *unstructured.Unstructured, c chan<- bool, timeout time.Duration) {
func (r *BtpOperatorReconciler) checkResourceExistence(ctx context.Context, u *unstructured.Unstructured, c chan<- bool) {
logger := log.FromContext(ctx)
ctxWithTimeout, cancel := context.WithTimeout(ctx, ReadyCheckInterval)
defer cancel()
Expand All @@ -707,7 +707,7 @@ func (r *BtpOperatorReconciler) checkResourceExistence(ctx context.Context, u *u
got := &unstructured.Unstructured{}
got.SetGroupVersionKind(u.GroupVersionKind())
for {
if time.Since(now) >= timeout {
if time.Since(now) >= ReadyTimeout {
logger.Error(err, fmt.Sprintf("timed out while checking %s %s existence in %s", u.GetName(), u.GetKind(), u.GetNamespace()))
return
}
Expand Down

0 comments on commit 304c09f

Please sign in to comment.