mirror of https://github.com/k3s-io/k3s
Merge pull request #66729 from dims/switch-off-leader-election-in-local-up-cluster
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Switch off leader election for scheduler and kube/cloud controller **What this PR does / why we need it**: We now have leader election on by default, for a single node local-up-cluster, this is not needed. Let's switch it off This will reduce the flakiness and timeouts we see in the local e2e CI jobs. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/8/head
commit
28b6fb5f7d
|
@ -669,6 +669,7 @@ function start_controller_manager {
|
|||
--kubeconfig "$CERT_DIR"/controller.kubeconfig \
|
||||
--use-service-account-credentials \
|
||||
--controllers="${KUBE_CONTROLLERS}" \
|
||||
--leader-elect=false \
|
||||
--master="https://${API_HOST}:${API_SECURE_PORT}" >"${CTLRMGR_LOG}" 2>&1 &
|
||||
CTLRMGR_PID=$!
|
||||
}
|
||||
|
@ -698,6 +699,7 @@ function start_cloud_controller_manager {
|
|||
--cloud-config=${CLOUD_CONFIG} \
|
||||
--kubeconfig "$CERT_DIR"/controller.kubeconfig \
|
||||
--use-service-account-credentials \
|
||||
--leader-elect=false \
|
||||
--master="https://${API_HOST}:${API_SECURE_PORT}" >"${CLOUD_CTLRMGR_LOG}" 2>&1 &
|
||||
CLOUD_CTLRMGR_PID=$!
|
||||
}
|
||||
|
@ -903,6 +905,7 @@ EOF
|
|||
SCHEDULER_LOG=${LOG_DIR}/kube-scheduler.log
|
||||
${CONTROLPLANE_SUDO} "${GO_OUT}/hyperkube" scheduler \
|
||||
--v=${LOG_LEVEL} \
|
||||
--leader-elect=false \
|
||||
--kubeconfig "$CERT_DIR"/scheduler.kubeconfig \
|
||||
--feature-gates="${FEATURE_GATES}" \
|
||||
--master="https://${API_HOST}:${API_SECURE_PORT}" >"${SCHEDULER_LOG}" 2>&1 &
|
||||
|
|
Loading…
Reference in New Issue