diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 62117a9e8d6..e6195d73383 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -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 <> "${TMP_DIR}"/kubelet.yaml +memorySwap: + swapBehavior: LimitedSwap +EOF + fi + { # authentication echo "authentication:"