Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Set requeue time for etcd proxy [etcd proxy][v0.2.0] #129

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading