Copy to ClipboardCopied!Toggle word wrapToggle overflow
根据返回值、结果和错误,请求可能会重新排序,协调循环可能会再次触发:
// Reconcile successful - don't requeue
return ctrl.Result{}, nil
// Reconcile failed due to error - requeue
return ctrl.Result{}, err
// Requeue for any reason other than an error
return ctrl.Result{Requeue: true}, nil
// Reconcile successful - don't requeue
return ctrl.Result{}, nil
// Reconcile failed due to error - requeue
return ctrl.Result{}, err
// Requeue for any reason other than an error
return ctrl.Result{Requeue: true}, nil
Copy to ClipboardCopied!Toggle word wrapToggle overflow
您可以将 Result.RequeueAfter 设置为在宽限期后重新排序请求:
import "time"
// Reconcile for any reason other than an error after 5 seconds
return ctrl.Result{RequeueAfter: time.Second*5}, nil
import "time"
// Reconcile for any reason other than an error after 5 seconds
return ctrl.Result{RequeueAfter: time.Second*5}, nil
Copy to ClipboardCopied!Toggle word wrapToggle overflow