mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 19:52:42 +00:00
Merge pull request #39972 from derekwaynecarr/pod-cgroups-default
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942) Rename experimental-cgroups-per-pod flag **What this PR does / why we need it**: 1. Rename `experimental-cgroups-per-qos` to `cgroups-per-qos` 1. Update hack/local-up-cluster to match `CGROUP_DRIVER` with docker runtime if used. **Special notes for your reviewer**: We plan to roll this feature out in the upcoming release. Previous node e2e runs were running with this feature on by default. We will default this feature on for all e2es next week. **Release note**: ```release-note Rename --experiemental-cgroups-per-qos to --cgroups-per-qos ```
This commit is contained in:
@@ -34,7 +34,7 @@ NET_PLUGIN=${NET_PLUGIN:-""}
|
||||
NET_PLUGIN_DIR=${NET_PLUGIN_DIR:-""}
|
||||
SERVICE_CLUSTER_IP_RANGE=${SERVICE_CLUSTER_IP_RANGE:-10.0.0.0/24}
|
||||
# if enabled, must set CGROUP_ROOT
|
||||
EXPERIMENTAL_CGROUPS_PER_QOS=${EXPERIMENTAL_CGROUPS_PER_QOS:-false}
|
||||
CGROUPS_PER_QOS=${CGROUPS_PER_QOS:-false}
|
||||
# this is not defaulted to preserve backward compatibility.
|
||||
# if EXPERIMENTAL_CGROUPS_PER_QOS is enabled, recommend setting to /
|
||||
CGROUP_ROOT=${CGROUP_ROOT:-""}
|
||||
@@ -189,6 +189,17 @@ CERT_DIR=${CERT_DIR:-"/var/run/kubernetes"}
|
||||
ROOT_CA_FILE=$CERT_DIR/apiserver.crt
|
||||
EXPERIMENTAL_CRI=${EXPERIMENTAL_CRI:-"false"}
|
||||
|
||||
# name of the cgroup driver, i.e. cgroupfs or systemd
|
||||
if [[ ${CONTAINER_RUNTIME} == "docker" ]]; then
|
||||
# default cgroup driver to match what is reported by docker to simplify local development
|
||||
if [[ -z ${CGROUP_DRIVER} ]]; then
|
||||
# match driver with docker runtime reported value (they must match)
|
||||
CGROUP_DRIVER=$(docker info | grep "Cgroup Driver:" | cut -f3- -d' ')
|
||||
echo "Kubelet cgroup driver defaulted to use: ${CGROUP_DRIVER}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Ensure CERT_DIR is created for auto-generated crt/key and kubeconfig
|
||||
mkdir -p "${CERT_DIR}" &>/dev/null || sudo mkdir -p "${CERT_DIR}"
|
||||
@@ -542,7 +553,7 @@ function start_kubelet {
|
||||
--feature-gates="${FEATURE_GATES}" \
|
||||
--cpu-cfs-quota=${CPU_CFS_QUOTA} \
|
||||
--enable-controller-attach-detach="${ENABLE_CONTROLLER_ATTACH_DETACH}" \
|
||||
--experimental-cgroups-per-qos=${EXPERIMENTAL_CGROUPS_PER_QOS} \
|
||||
--cgroups-per-qos=${CGROUPS_PER_QOS} \
|
||||
--cgroup-driver=${CGROUP_DRIVER} \
|
||||
--cgroup-root=${CGROUP_ROOT} \
|
||||
--keep-terminated-pod-volumes=true \
|
||||
|
Reference in New Issue
Block a user