mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Add LIMITED_SWAP env var to enable limited swap
Signed-off-by: Itamar Holder <iholder@redhat.com>
This commit is contained in:
parent
95c8d61918
commit
f37aec6c57
@ -47,6 +47,8 @@ CGROUP_DRIVER=${CGROUP_DRIVER:-""}
|
||||
CGROUP_ROOT=${CGROUP_ROOT:-""}
|
||||
# owner of client certs, default to current user if not specified
|
||||
USER=${USER:-$(whoami)}
|
||||
# if true, limited swap is being used instead of unlimited swap (default)
|
||||
LIMITED_SWAP=${LIMITED_SWAP:-""}
|
||||
|
||||
# required for cni installation
|
||||
CNI_CONFIG_DIR=${CNI_CONFIG_DIR:-/etc/cni/net.d}
|
||||
@ -832,6 +834,13 @@ tracing:
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ "$LIMITED_SWAP" == "true" ]]; then
|
||||
cat <<EOF >> "${TMP_DIR}"/kubelet.yaml
|
||||
memorySwap:
|
||||
swapBehavior: LimitedSwap
|
||||
EOF
|
||||
fi
|
||||
|
||||
{
|
||||
# authentication
|
||||
echo "authentication:"
|
||||
|
Loading…
Reference in New Issue
Block a user