Merge pull request #86750 from RainbowMango/pr_postpone_swap_warning

Postpone flag warning log to just before it be used
This commit is contained in:
Kubernetes Prow Robot 2019-12-31 12:25:40 -08:00 committed by GitHub
commit 4058cdcc2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,11 +133,6 @@ if [ "${CLOUD_PROVIDER}" == "openstack" ]; then
fi fi
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 even if swap is enabled; production deployments should disable swap."
fi
if [ "$(id -u)" != "0" ]; then 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 echo "WARNING : This script MAY be run as root for docker socket / iptables functionality; if failures occur, retry as root." 2>&1
fi fi
@ -788,6 +783,11 @@ function start_kubelet {
${KUBELET_FLAGS} ${KUBELET_FLAGS}
) )
# warn if users are running with swap allowed
if [ "${FAIL_SWAP_ON}" == "false" ]; then
echo "WARNING : The kubelet is configured to not fail even if swap is enabled; production deployments should disable swap."
fi
if [[ "${REUSE_CERTS}" != true ]]; then if [[ "${REUSE_CERTS}" != true ]]; then
generate_kubelet_certs generate_kubelet_certs
fi fi