Skip to content

Commit

Permalink
set requeue time for etcd proxy
Browse files Browse the repository at this point in the history
Signed-off-by: nasusoba <[email protected]>
  • Loading branch information
nasusoba committed Jun 14, 2024
1 parent 888216c commit 891e1b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions controlplane/controllers/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ const (
// dependent certificates have been created.
dependentCertRequeueAfter = 30 * time.Second

// etcdRemovalRequeueAfter is how long to wait before checking again to see if
// etcd member is successfully removed.
etcdRemovalRequeueAfter = 30 * time.Second

k3sHookName = "k3s"
)
2 changes: 1 addition & 1 deletion controlplane/controllers/kthreescontrolplane_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (r *KThreesControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.
}
if cluster == nil {
logger.Info("Cluster Controller has not yet set OwnerRef")
return ctrl.Result{Requeue: true}, nil
return ctrl.Result{}, nil
}
logger = logger.WithValues("cluster", cluster.Name)

Expand Down
2 changes: 1 addition & 1 deletion controlplane/controllers/machine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (r *MachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
}
if !etcdRemoved {
logger.Info("wait k3s embedded etcd controller to remove etcd")
return ctrl.Result{Requeue: true}, err
return ctrl.Result{RequeueAfter: etcdRemovalRequeueAfter}, nil
}

nodeName := ""
Expand Down

0 comments on commit 891e1b5

Please sign in to comment.