Skip to content

Commit

Permalink
Increase inotify resources
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Morales <[email protected]>
  • Loading branch information
electrocucaracha committed Nov 10, 2022
1 parent da99a64 commit 9fa6f9c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,28 @@ function wan_exec {
sudo docker exec wan sh -c "$cmd"
}

function setup_sysctl {
local key="$1"
local value="$2"

if [ "$(sysctl -n "$key")" != "$value" ]; then
if [ -d /etc/sysctl.d ]; then
echo "$key=$value" | sudo tee "/etc/sysctl.d/99-$key.conf"
elif [ -f /etc/sysctl.conf ]; then
echo "$key=$value" | sudo tee --append /etc/sysctl.conf
fi

sudo sysctl "$key=$value"
fi
}

function deploy_multus {
kubectl apply --filename="https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/v$MULTUS_CNI_VERSION/deployments/multus-daemonset-thick-plugin.yml"
}

setup_sysctl "fs.inotify.max_user_watches" "524288"
setup_sysctl "fs.inotify.max_user_instances" "512"

# Create WAN emulator to interconnect clusters
if [ -z "$(sudo docker images wanem:0.0.1 -q)" ]; then
sudo docker build -t wanem:0.0.1 .
Expand Down

0 comments on commit 9fa6f9c

Please sign in to comment.