From fa9ff6991e3a833a35c80dbf506b77b36cd97513 Mon Sep 17 00:00:00 2001 From: Aleksandra Malinowska Date: Tue, 28 Nov 2017 11:03:44 +0100 Subject: [PATCH] Add checking HPA_USE_REST_CLIENTS in addition to ENABLE_METRICS_SERVER when disabling REST clients use for HPA --- cluster/gce/gci/configure-helper.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index cc0b3d20452..5af388c4d8e 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -1807,8 +1807,10 @@ function start-kube-controller-manager { if [[ -n "${CLUSTER_SIGNING_DURATION:-}" ]]; then params+=" --experimental-cluster-signing-duration=$CLUSTER_SIGNING_DURATION" fi - # disable using HPA metrics REST clients if metrics-server isn't enabled - if [[ "${ENABLE_METRICS_SERVER:-}" != "true" ]]; then + # Disable using HPA metrics REST clients if metrics-server isn't enabled, + # or if we want to explicitly disable it by setting HPA_USE_REST_CLIENT. + if [[ "${ENABLE_METRICS_SERVER:-}" != "true" ]] || + [[ "${HPA_USE_REST_CLIENTS:-}" == "false" ]]; then params+=" --horizontal-pod-autoscaler-use-rest-clients=false" fi