Merge pull request #51054 from derekwaynecarr/local-up-swap
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173) hack/local-up-cluster.sh defaults to allow swap **What this PR does / why we need it**: developers on linux typically have swap on while developing. defaults local-up-cluster experience to not fail kubelet if swap is enabled. **Release note**: ```release-note NONE ```
This commit is contained in:
		@@ -31,6 +31,8 @@ KUBELET_AUTHORIZATION_WEBHOOK=${KUBELET_AUTHORIZATION_WEBHOOK:-""}
 | 
			
		||||
KUBELET_AUTHENTICATION_WEBHOOK=${KUBELET_AUTHENTICATION_WEBHOOK:-""}
 | 
			
		||||
POD_MANIFEST_PATH=${POD_MANIFEST_PATH:-"/var/run/kubernetes/static-pods"}
 | 
			
		||||
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"
 | 
			
		||||
NET_PLUGIN=${NET_PLUGIN:-""}
 | 
			
		||||
# Place the config files and binaries required by NET_PLUGIN in these directory,
 | 
			
		||||
@@ -112,6 +114,11 @@ if [ "${CLOUD_PROVIDER}" == "openstack" ]; then
 | 
			
		||||
    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
 | 
			
		||||
    echo "WARNING : This script MAY be run as root for docker socket / iptables functionality; if failures occur, retry as root." 2>&1
 | 
			
		||||
fi
 | 
			
		||||
@@ -665,6 +672,7 @@ function start_kubelet {
 | 
			
		||||
        --eviction-soft=${EVICTION_SOFT} \
 | 
			
		||||
        --eviction-pressure-transition-period=${EVICTION_PRESSURE_TRANSITION_PERIOD} \
 | 
			
		||||
        --pod-manifest-path="${POD_MANIFEST_PATH}" \
 | 
			
		||||
        --fail-swap-on="${FAIL_SWAP_ON}" \
 | 
			
		||||
        ${auth_args} \
 | 
			
		||||
        ${dns_args} \
 | 
			
		||||
        ${cni_conf_dir_args} \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user