File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,13 @@ ENABLE_PROMETHEUS_TO_SD="${ENABLE_PROMETHEUS_TO_SD:-false}"
483
483
# Optional: [Experiment Only] Run kube-proxy as a DaemonSet if set to true, run as static pods otherwise.
484
484
KUBE_PROXY_DAEMONSET=" ${KUBE_PROXY_DAEMONSET:- false} " # true, false
485
485
486
+ # Control whether the startup scripts manage the lifecycle of kube-proxy
487
+ # When true, the startup scripts do not enable kube-proxy either as a daemonset addon or as a static pod
488
+ # regardless of the value of KUBE_PROXY_DAEMONSET.
489
+ # When false, the value of KUBE_PROXY_DAEMONSET controls whether kube-proxy comes up as a static pod or
490
+ # as an addon daemonset.
491
+ KUBE_PROXY_DISABLE=" ${KUBE_PROXY_DISABLE:- false} " # true, false
492
+
486
493
# Optional: duration of cluster signed certificates.
487
494
CLUSTER_SIGNING_DURATION=" ${CLUSTER_SIGNING_DURATION:- } "
488
495
Original file line number Diff line number Diff line change @@ -525,6 +525,13 @@ ENABLE_PROMETHEUS_TO_SD=${ENABLE_PROMETHEUS_TO_SD:-true}
525
525
# Optional: [Experiment Only] Run kube-proxy as a DaemonSet if set to true, run as static pods otherwise.
526
526
KUBE_PROXY_DAEMONSET=${KUBE_PROXY_DAEMONSET:- false} # true, false
527
527
528
+ # Control whether the startup scripts manage the lifecycle of kube-proxy
529
+ # When true, the startup scripts do not enable kube-proxy either as a daemonset addon or as a static pod
530
+ # regardless of the value of KUBE_PROXY_DAEMONSET.
531
+ # When false, the value of KUBE_PROXY_DAEMONSET controls whether kube-proxy comes up as a static pod or
532
+ # as an addon daemonset.
533
+ KUBE_PROXY_DISABLE=" ${KUBE_PROXY_DISABLE:- false} " # true, false
534
+
528
535
# Optional: Change the kube-proxy implementation. Choices are [iptables, ipvs].
529
536
KUBE_PROXY_MODE=${KUBE_PROXY_MODE:- iptables}
530
537
Original file line number Diff line number Diff line change @@ -2519,7 +2519,7 @@ function start-kube-addons {
2519
2519
fi
2520
2520
2521
2521
# Set up manifests of other addons.
2522
- if [[ " ${KUBE_PROXY_DAEMONSET:- } " == " true" ]]; then
2522
+ if [[ " ${KUBE_PROXY_DAEMONSET:- } " == " true" ]] && [[ " ${KUBE_PROXY_DISABLE :- } " != " true " ]] ; then
2523
2523
if [ -n " ${CUSTOM_KUBE_PROXY_YAML:- } " ]; then
2524
2524
# Replace with custom GKE kube proxy.
2525
2525
cat > " $src_dir /kube-proxy/kube-proxy-ds.yaml" << EOF
@@ -3027,7 +3027,7 @@ function main() {
3027
3027
else
3028
3028
create-node-pki
3029
3029
create-kubelet-kubeconfig " ${KUBERNETES_MASTER_NAME} "
3030
- if [[ " ${KUBE_PROXY_DAEMONSET:- } " != " true" ]]; then
3030
+ if [[ " ${KUBE_PROXY_DAEMONSET:- } " != " true" ]] && [[ " ${KUBE_PROXY_DISABLE :- } " != " true " ]] ; then
3031
3031
create-kubeproxy-user-kubeconfig
3032
3032
fi
3033
3033
if [[ " ${ENABLE_NODE_PROBLEM_DETECTOR:- } " == " standalone" ]]; then
@@ -3072,7 +3072,7 @@ function main() {
3072
3072
start-lb-controller
3073
3073
update-legacy-addon-node-labels &
3074
3074
else
3075
- if [[ " ${KUBE_PROXY_DAEMONSET:- } " != " true" ]]; then
3075
+ if [[ " ${KUBE_PROXY_DAEMONSET:- } " != " true" ]] && [[ " ${KUBE_PROXY_DISABLE :- } " != " true " ]] ; then
3076
3076
start-kube-proxy
3077
3077
fi
3078
3078
if [[ " ${ENABLE_NODE_PROBLEM_DETECTOR:- } " == " standalone" ]]; then
You can’t perform that action at this time.
0 commit comments