mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
hack/local-up-cluster.sh defaults to allow swap
This commit is contained in:
parent
c112dbcab4
commit
17c3b1ff56
@ -31,6 +31,8 @@ KUBELET_AUTHORIZATION_WEBHOOK=${KUBELET_AUTHORIZATION_WEBHOOK:-""}
|
|||||||
KUBELET_AUTHENTICATION_WEBHOOK=${KUBELET_AUTHENTICATION_WEBHOOK:-""}
|
KUBELET_AUTHENTICATION_WEBHOOK=${KUBELET_AUTHENTICATION_WEBHOOK:-""}
|
||||||
POD_MANIFEST_PATH=${POD_MANIFEST_PATH:-"/var/run/kubernetes/static-pods"}
|
POD_MANIFEST_PATH=${POD_MANIFEST_PATH:-"/var/run/kubernetes/static-pods"}
|
||||||
KUBELET_FLAGS=${KUBELET_FLAGS:-""}
|
KUBELET_FLAGS=${KUBELET_FLAGS:-""}
|
||||||
|
# many dev environments run with swap on, so we don't fail in this env
|
||||||
|
FAIL_SWAP_ON=${FAIL_SWAP_ON:-"false"}
|
||||||
# Name of the network plugin, eg: "kubenet"
|
# Name of the network plugin, eg: "kubenet"
|
||||||
NET_PLUGIN=${NET_PLUGIN:-""}
|
NET_PLUGIN=${NET_PLUGIN:-""}
|
||||||
# Place the config files and binaries required by NET_PLUGIN in these directory,
|
# Place the config files and binaries required by NET_PLUGIN in these directory,
|
||||||
@ -112,6 +114,11 @@ if [ "${CLOUD_PROVIDER}" == "openstack" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
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."
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
echo "WARNING : This script MAY be run as root for docker socket / iptables functionality; if failures occur, retry as root." 2>&1
|
echo "WARNING : This script MAY be run as root for docker socket / iptables functionality; if failures occur, retry as root." 2>&1
|
||||||
fi
|
fi
|
||||||
@ -665,6 +672,7 @@ function start_kubelet {
|
|||||||
--eviction-soft=${EVICTION_SOFT} \
|
--eviction-soft=${EVICTION_SOFT} \
|
||||||
--eviction-pressure-transition-period=${EVICTION_PRESSURE_TRANSITION_PERIOD} \
|
--eviction-pressure-transition-period=${EVICTION_PRESSURE_TRANSITION_PERIOD} \
|
||||||
--pod-manifest-path="${POD_MANIFEST_PATH}" \
|
--pod-manifest-path="${POD_MANIFEST_PATH}" \
|
||||||
|
--fail-swap-on="${FAIL_SWAP_ON}" \
|
||||||
${auth_args} \
|
${auth_args} \
|
||||||
${dns_args} \
|
${dns_args} \
|
||||||
${cni_conf_dir_args} \
|
${cni_conf_dir_args} \
|
||||||
|
Loading…
Reference in New Issue
Block a user