mirror of https://github.com/k3s-io/k3s
Merge pull request #43537 from Random-Liu/disable-master-taint-by-default
Automatic merge from submit-queue Add an env KUBE_ENABLE_MASTER_NOSCHEDULE_TAINT and disable it by default This PR changed master `NoSchedule` taint to opt-in. As is discussed with @bgrant0607 @janetkuo, `NoSchedule` master taint breaks existing user workload, we should not enable it by default. Previously, NPD required the taint because it can only support one OS distro with a specific configuration. If master and node are using different OS distros, NPD will not work either on master or node. However, we've already fixed this in https://github.com/kubernetes/kubernetes/pull/40206, so for NPD it's fine to disable the taint. This should work, but I'll still try it in my cluster to confirm. @kubernetes/sig-scheduling-misc @dchen1107 @mikedanesepull/6/head
commit
c415325ced
|
@ -516,7 +516,6 @@ function start-kubelet {
|
|||
if [[ "${REGISTER_MASTER_KUBELET:-false}" == "true" ]]; then
|
||||
flags+=" --api-servers=https://${KUBELET_APISERVER}"
|
||||
flags+=" --register-schedulable=false"
|
||||
flags+=" --register-with-taints=node.alpha.kubernetes.io/ismaster=:NoSchedule"
|
||||
else
|
||||
# Standalone mode (not widely used?)
|
||||
flags+=" --pod-cidr=${MASTER_IP_RANGE}"
|
||||
|
|
|
@ -684,7 +684,6 @@ function start-kubelet {
|
|||
if [[ "${REGISTER_MASTER_KUBELET:-false}" == "true" ]]; then
|
||||
flags+=" --api-servers=https://${KUBELET_APISERVER}"
|
||||
flags+=" --register-schedulable=false"
|
||||
flags+=" --register-with-taints=node.alpha.kubernetes.io/ismaster=:NoSchedule"
|
||||
else
|
||||
# Standalone mode (not widely used?)
|
||||
flags+=" --pod-cidr=${MASTER_IP_RANGE}"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
# running on the master.
|
||||
{% if grains.kubelet_api_servers is defined -%}
|
||||
{% set api_servers_with_port = "--api-servers=https://" + grains.kubelet_api_servers -%}
|
||||
{% set master_kubelet_args = master_kubelet_args + "--register-schedulable=false --register-with-taints=node.alpha.kubernetes.io/ismaster=:NoSchedule" -%}
|
||||
{% set master_kubelet_args = master_kubelet_args + "--register-schedulable=false" -%}
|
||||
{% else -%}
|
||||
{% set api_servers_with_port = "" -%}
|
||||
{% endif -%}
|
||||
|
|
Loading…
Reference in New Issue