Skip to content

Commit 4058cdc

Browse files
authored
Merge pull request kubernetes#86750 from RainbowMango/pr_postpone_swap_warning
Postpone flag warning log to just before it be used
2 parents 8743d98 + 36cbce1 commit 4058cdc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hack/local-up-cluster.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ if [ "${CLOUD_PROVIDER}" == "openstack" ]; then
133133
fi
134134
fi
135135

136-
# warn if users are running with swap allowed
137-
if [ "${FAIL_SWAP_ON}" == "false" ]; then
138-
echo "WARNING : The kubelet is configured to not fail even if swap is enabled; production deployments should disable swap."
139-
fi
140-
141136
if [ "$(id -u)" != "0" ]; then
142137
echo "WARNING : This script MAY be run as root for docker socket / iptables functionality; if failures occur, retry as root." 2>&1
143138
fi
@@ -788,6 +783,11 @@ function start_kubelet {
788783
${KUBELET_FLAGS}
789784
)
790785

786+
# warn if users are running with swap allowed
787+
if [ "${FAIL_SWAP_ON}" == "false" ]; then
788+
echo "WARNING : The kubelet is configured to not fail even if swap is enabled; production deployments should disable swap."
789+
fi
790+
791791
if [[ "${REUSE_CERTS}" != true ]]; then
792792
generate_kubelet_certs
793793
fi

0 commit comments

Comments
 (0)