From 36cbce1182a77af4a87a5d0598e969803be58bc4 Mon Sep 17 00:00:00 2001 From: RainbowMango Date: Tue, 31 Dec 2019 20:01:39 +0800 Subject: [PATCH] Postpone flag warning log to just before it be used. --- hack/local-up-cluster.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 7e1de11ae71..be149907437 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -133,11 +133,6 @@ 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 even 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 @@ -788,6 +783,11 @@ function start_kubelet { ${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 generate_kubelet_certs fi