mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Add kube-proxy config file support
Add support for configuring kube-proxy via a config file instead of command line flags.
This commit is contained in:
@@ -689,12 +689,20 @@ function start_kubelet {
|
||||
|
||||
function start_kubeproxy {
|
||||
PROXY_LOG=${LOG_DIR}/kube-proxy.log
|
||||
|
||||
cat <<EOF > /tmp/kube-proxy.yaml
|
||||
apiVersion: componentconfig/v1alpha1
|
||||
kind: KubeProxyConfiguration
|
||||
clientConnection:
|
||||
kubeconfig: ${CERT_DIR}/kube-proxy.kubeconfig
|
||||
hostnameOverride: ${HOSTNAME_OVERRIDE}
|
||||
featureGates: ${FEATURE_GATES}
|
||||
EOF
|
||||
|
||||
sudo "${GO_OUT}/hyperkube" proxy \
|
||||
--v=${LOG_LEVEL} \
|
||||
--hostname-override="${HOSTNAME_OVERRIDE}" \
|
||||
--feature-gates="${FEATURE_GATES}" \
|
||||
--kubeconfig "$CERT_DIR"/kube-proxy.kubeconfig \
|
||||
--master="https://${API_HOST}:${API_SECURE_PORT}" >"${PROXY_LOG}" 2>&1 &
|
||||
--config=/tmp/kube-proxy.yaml \
|
||||
--master="https://${API_HOST}:${API_SECURE_PORT}" >"${PROXY_LOG}" \
|
||||
--v=${LOG_LEVEL} 2>&1 &
|
||||
PROXY_PID=$!
|
||||
|
||||
SCHEDULER_LOG=${LOG_DIR}/kube-scheduler.log
|
||||
|
||||
Reference in New Issue
Block a user