keep the 2m backoff on config apply failures while pods are waiting or the StatefulSet is not ready
This commit is contained in:
@@ -97,7 +97,7 @@ func (r *BindClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
|
||||
return ctrl.Result{}, err
|
||||
}
|
||||
|
||||
if !ready {
|
||||
if !ready && requeue == 0 {
|
||||
requeue = requeueShort
|
||||
}
|
||||
if requeue > 0 {
|
||||
@@ -462,7 +462,8 @@ func sha256Hex(s string) string {
|
||||
// reconfigPods runs rndc reconfig on each ready pod whose applied config is not
|
||||
// the desired one, once kubelet has propagated it to the pod's mount (eventually
|
||||
// consistent, up to ~90s). It records applied hashes in status and sets the
|
||||
// ConfigApplied condition, returning a requeue delay while any pod is pending.
|
||||
// ConfigApplied condition, returning a requeue delay while any pod is pending
|
||||
// (requeueLong if any pod failed, so waiting pods cannot hot-loop the failure).
|
||||
func (r *BindClusterReconciler) reconfigPods(ctx context.Context, c *bindv1alpha1.BindCluster, primaryConf, secondaryConf, keysConf string) time.Duration {
|
||||
if r.Exec == nil {
|
||||
return 0
|
||||
@@ -526,8 +527,7 @@ func (r *BindClusterReconciler) reconfigPods(ctx context.Context, c *bindv1alpha
|
||||
if len(failed)+len(execErrs) > 0 {
|
||||
requeue = requeueLong
|
||||
log.FromContext(ctx).Info("config apply failed", "cluster", c.Name, "reason", cond.Reason, "errors", cond.Message)
|
||||
}
|
||||
if len(waiting) > 0 {
|
||||
} else if len(waiting) > 0 {
|
||||
requeue = requeueShort
|
||||
}
|
||||
meta.SetStatusCondition(&c.Status.Conditions, cond)
|
||||
|
||||
Reference in New Issue
Block a user