From 731c92896ba389f85bf3b4b91ff60e288e2b4239 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 1 Mar 2018 10:01:50 +0100 Subject: [PATCH] local-up-cluster: fix kube-proxy featureGates configuration Commit 43cb024402e6 replaced command line parameters with a .yaml configuration file. But feature gates must be configured with a map in .yaml, not with a comma-separated string as in the command line parameters. As a result, kube-proxy failed to start and networking was broken in the cluster. Commit c339fc0c4fad tried to fix that by moving feature gates back to the command line, but later it was found out that the command line parameter gets ignored when also specifying a config. Therefore now the feature gates variable gets converted into a proper map in the config. --- hack/local-up-cluster.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 35c4398072..d46e73c8cc 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -837,10 +837,18 @@ clientConnection: hostnameOverride: ${HOSTNAME_OVERRIDE} mode: ${KUBE_PROXY_MODE} EOF + if [[ -n ${FEATURE_GATES} ]]; then + echo "featureGates:" + # Convert from foo=true,bar=false to + # foo: true + # bar: false + for gate in $(echo ${FEATURE_GATES} | tr ',' ' '); do + echo $gate | sed -e 's/\(.*\)=\(.*\)/ \1: \2/' + done + fi >>/tmp/kube-proxy.yaml sudo "${GO_OUT}/hyperkube" proxy \ --v=${LOG_LEVEL} \ - --feature-gates="${FEATURE_GATES}" \ --config=/tmp/kube-proxy.yaml \ --master="https://${API_HOST}:${API_SECURE_PORT}" >"${PROXY_LOG}" 2>&1 & PROXY_PID=$!