From 66196c1043f793041cf0fae306b4dd8016f6b5a7 Mon Sep 17 00:00:00 2001 From: Rob Scott Date: Thu, 5 Sep 2019 19:22:55 -0700 Subject: [PATCH] Improving GCE cluster up logic for EndpointSlice Controller --- cluster/gce/config-default.sh | 4 ++++ cluster/gce/config-test.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index e5a3a671fd7..ff6ac05e9bf 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -247,6 +247,10 @@ RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}" if [[ "${KUBE_FEATURE_GATES:-}" == "AllAlpha=true" ]]; then RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-api/all=true}" +fi + +# If feature gates includes AllAlpha or EndpointSlice, and EndpointSlice has not been disabled, add EndpointSlice controller to list of controllers to run. +if [[ (( "${KUBE_FEATURE_GATES:-}" == *"AllAlpha=true"* ) || ( "${KUBE_FEATURE_GATES:-}" == *"EndpointSlice=true"* )) && "${KUBE_FEATURE_GATES:-}" != *"EndpointSlice=false"* ]]; then RUN_CONTROLLERS="${RUN_CONTROLLERS:-*,endpointslice}" fi diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 6ab9a4ea9d9..56edd167a78 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -136,6 +136,10 @@ RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}" if [[ "${KUBE_FEATURE_GATES:-}" == "AllAlpha=true" ]]; then RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-api/all=true}" +fi + +# If feature gates includes AllAlpha or EndpointSlice, and EndpointSlice has not been disabled, add EndpointSlice controller to list of controllers to run. +if [[ (( "${KUBE_FEATURE_GATES:-}" == *"AllAlpha=true"* ) || ( "${KUBE_FEATURE_GATES:-}" == *"EndpointSlice=true"* )) && "${KUBE_FEATURE_GATES:-}" != *"EndpointSlice=false"* ]]; then RUN_CONTROLLERS="${RUN_CONTROLLERS:-*,endpointslice}" fi