Skip to content

Commit 6e6cc9d

Browse files
authored
Merge pull request #13099 from k8s-infra-cherrypick-robot/cherry-pick-13093-to-release-1.12
[release-1.12] 🐛 Increase reconcile timeout for DockerMachine
2 parents 742c696 + d0fc375 commit 6e6cc9d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

controlplane/kubeadm/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,10 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
495495
EtcdLogger: etcdLogger,
496496
RemoteConditionsGracePeriod: remoteConditionsGracePeriod,
497497
RuntimeClient: runtimeClient,
498-
}).SetupWithManager(ctx, mgr, concurrency(kubeadmControlPlaneConcurrency)); err != nil {
498+
}).SetupWithManager(ctx, mgr, controller.Options{
499+
MaxConcurrentReconciles: kubeadmControlPlaneConcurrency,
500+
ReconciliationTimeout: 3 * time.Minute, // increase reconciliation timeout because the KubeadmControlPlaneReconciler tries to connect with all the etcd member, and times out if those operations might sum up.
501+
}); err != nil {
499502
setupLog.Error(err, "unable to create controller", "controller", "KubeadmControlPlane")
500503
os.Exit(1)
501504
}

test/infrastructure/docker/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
427427
WatchFilterValue: watchFilterValue,
428428
}).SetupWithManager(ctx, mgr, controller.Options{
429429
MaxConcurrentReconciles: concurrency,
430+
ReconciliationTimeout: 5 * time.Minute, // increase reconciliation timeout because the DockerMachineReconciler performs long operations like kubeadm init/join, image copy, etc.
430431
}); err != nil {
431432
setupLog.Error(err, "Unable to create controller", "controller", "DockerMachine")
432433
os.Exit(1)
@@ -470,6 +471,7 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
470471
APIServerMux: apiServerMux,
471472
}).SetupWithManager(ctx, mgr, controller.Options{
472473
MaxConcurrentReconciles: concurrency,
474+
ReconciliationTimeout: 5 * time.Minute, // increase reconciliation timeout because the Docker backend performs long operations like kubeadm init/join, image copy, etc.
473475
}); err != nil {
474476
setupLog.Error(err, "Unable to create controller", "controller", "DevMachine")
475477
os.Exit(1)

0 commit comments

Comments
 (0)