mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
local-up-cluster: fix kube-proxy featureGates configuration
Commit43cb024402
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. Commitc339fc0c4f
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.
This commit is contained in:
parent
9cf35f355b
commit
731c92896b
@ -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=$!
|
||||
|
Loading…
Reference in New Issue
Block a user