Merge pull request #56482 from aleksandra-malinowska/hpa-use-rest-clients-var

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add checking HPA_USE_REST_CLIENTS

Add checking HPA_USE_REST_CLIENTS in addition to ENABLE_METRICS_SERVER when disabling REST clients use for HPA.

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-11-29 14:25:48 -08:00 committed by GitHub
commit a8a5d44a1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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