mirror of https://github.com/k3s-io/k3s
export ENABLE_POD_PRIORITY_PREEMPTION=true to enable Pod priority and preemption
parent
afb26b9323
commit
e0edce33ef
|
@ -71,6 +71,8 @@ FEATURE_GATES=${FEATURE_GATES:-"AllAlpha=false"}
|
|||
STORAGE_BACKEND=${STORAGE_BACKEND:-"etcd3"}
|
||||
# enable swagger ui
|
||||
ENABLE_SWAGGER_UI=${ENABLE_SWAGGER_UI:-false}
|
||||
# enable Pod priority and preemption
|
||||
ENABLE_POD_PRIORITY_PREEMPTION=${ENABLE_POD_PRIORITY_PREEMPTION:-""}
|
||||
|
||||
# enable kubernetes dashboard
|
||||
ENABLE_CLUSTER_DASHBOARD=${KUBE_ENABLE_CLUSTER_DASHBOARD:-false}
|
||||
|
@ -115,11 +117,16 @@ if [ "${CLOUD_PROVIDER}" == "openstack" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
#set feature gates if using ipvs mode
|
||||
# set feature gates if using ipvs mode
|
||||
if [ "${KUBEPROXY_MODE}" == "ipvs" ]; then
|
||||
FEATURE_GATES="$FEATURE_GATES,SupportIPVSProxyMode=true"
|
||||
fi
|
||||
|
||||
# set feature gates if enable Pod priority and preemption
|
||||
if [ "${ENABLE_POD_PRIORITY_PREEMPTION}" == true ]; then
|
||||
FEATURE_GATES="$FEATURE_GATES,PodPriority=true"
|
||||
fi
|
||||
|
||||
# warn if users are running with swap allowed
|
||||
if [ "${FAIL_SWAP_ON}" == "false" ]; then
|
||||
echo "WARNING : The kubelet is configured to not fail if swap is enabled; production deployments should disable swap."
|
||||
|
@ -417,6 +424,14 @@ function start_apiserver {
|
|||
if [[ -n "${NODE_ADMISSION}" ]]; then
|
||||
security_admission=",NodeRestriction"
|
||||
fi
|
||||
if [ "${ENABLE_POD_PRIORITY_PREEMPTION}" == true ]; then
|
||||
security_admission=",Priority"
|
||||
if [[ -n "${RUNTIME_CONFIG}" ]]; then
|
||||
RUNTIME_CONFIG+=","
|
||||
fi
|
||||
RUNTIME_CONFIG+="scheduling.k8s.io/v1alpha1=true"
|
||||
fi
|
||||
|
||||
|
||||
# Admission Controllers to invoke prior to persisting objects in cluster
|
||||
ADMISSION_CONTROL=MutatingAdmissionWebhook,Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount${security_admission},DefaultStorageClass,DefaultTolerationSeconds,ValidatingAdmissionWebhook,ResourceQuota
|
||||
|
|
Loading…
Reference in New Issue