Skip to content

Commit

Permalink
Add LIMITED_SWAP env var to enable limited swap
Browse files Browse the repository at this point in the history
Signed-off-by: Itamar Holder <[email protected]>
  • Loading branch information
iholder101 committed Jul 6, 2023
1 parent 2075b20 commit dbcf480
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hack/local-up-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
LIMITED_SWAP=${LIMITED_SWAP:-""}

# required for cni installation
CNI_CONFIG_DIR=${CNI_CONFIG_DIR:-/etc/cni/net.d}
Expand Down Expand Up @@ -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:"
Expand Down

0 comments on commit dbcf480

Please sign in to comment.