Skip to content

Commit

Permalink
Merge pull request #27117 from mwielgus/rename-2
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Rename ENABLE_NODE_AUTOSCALER to ENABLE_CLUSTER_AUTOSCALER - part 2

Follow up of #26993

cc: @fgrzadkowski @piosz @jszczepkowski 

```release-note
Rename environment variables (KUBE_)ENABLE_NODE_AUTOSCALER to (KUBE_)ENABLE_CLUSTER_AUTOSCALER. 
```

Fixes #26343
  • Loading branch information
k8s-merge-robot authored Jun 10, 2016
2 parents 8c88cbe + 8b09074 commit 447ce33
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,9 @@ RKT_PATH: $(yaml-quote ${RKT_PATH:-})
KUBERNETES_CONFIGURE_CBR0: $(yaml-quote ${KUBERNETES_CONFIGURE_CBR0:-true})
EOF
fi
if [[ "${ENABLE_NODE_AUTOSCALER:-}" == "true" || "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
cat >>$file <<EOF
ENABLE_CLUSTER_AUTOSCALER: $(yaml-quote "true")
ENABLE_CLUSTER_AUTOSCALER: $(yaml-quote ${ENABLE_CLUSTER_AUTOSCALER})
AUTOSCALER_MIG_CONFIG: $(yaml-quote ${AUTOSCALER_MIG_CONFIG})
EOF
fi
Expand Down
3 changes: 1 addition & 2 deletions cluster/gce/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ ENABLE_NODE_PROBLEM_DETECTOR="${KUBE_ENABLE_NODE_PROBLEM_DETECTOR:-true}"

# Optional: Create autoscaler for cluster's nodes.
ENABLE_CLUSTER_AUTOSCALER="${KUBE_ENABLE_CLUSTER_AUTOSCALER:-false}"
if [[ "${KUBE_ENABLE_NODE_AUTOSCALER:-false}" == "true" || "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
ENABLE_CLUSTER_AUTOSCALER="true"
if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
AUTOSCALER_MIN_NODES="${KUBE_AUTOSCALER_MIN_NODES:-}"
AUTOSCALER_MAX_NODES="${KUBE_AUTOSCALER_MAX_NODES:-}"
AUTOSCALER_ENABLE_SCALE_DOWN="${KUBE_AUTOSCALER_ENABLE_SCALE_DOWN:-true}"
Expand Down
3 changes: 1 addition & 2 deletions cluster/gce/config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ ENABLE_NODE_PROBLEM_DETECTOR="${KUBE_ENABLE_NODE_PROBLEM_DETECTOR:-true}"

# Optional: Create autoscaler for cluster's nodes.
ENABLE_CLUSTER_AUTOSCALER="${KUBE_ENABLE_CLUSTER_AUTOSCALER:-false}"
if [[ "${KUBE_ENABLE_NODE_AUTOSCALER:-false}" == "true" || "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
ENABLE_CLUSTER_AUTOSCALER="true"
if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
AUTOSCALER_MIN_NODES="${KUBE_AUTOSCALER_MIN_NODES:-}"
AUTOSCALER_MAX_NODES="${KUBE_AUTOSCALER_MAX_NODES:-}"
AUTOSCALER_ENABLE_SCALE_DOWN="${KUBE_AUTOSCALER_ENABLE_SCALE_DOWN:-false}"
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ function start-kube-scheduler {

# Starts cluster autoscaler.
function start-cluster-autoscaler {
if [[ "${ENABLE_NODE_AUTOSCALER:-}" == "true" || "${ENABLE_CLUSTER_AUTOSCALER:-}" == "true" ]]; then
if [[ "${ENABLE_CLUSTER_AUTOSCALER:-}" == "true" ]]; then
echo "Start kubernetes cluster autoscaler"
prepare-log-file /var/log/cluster-autoscaler.log

Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/trusty/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ start_kube_scheduler() {

# Starts k8s cluster autoscaler.
start_cluster_autoscaler() {
if [ "${ENABLE_NODE_AUTOSCALER:-}" = "true" ] || [ "${ENABLE_CLUSTER_AUTOSCALER:-}" = "true" ]; then
if [ "${ENABLE_CLUSTER_AUTOSCALER:-}" = "true" ]; then
prepare-log-file /var/log/cluster-autoscaler.log

# Remove salt comments and replace variables with values
Expand Down

0 comments on commit 447ce33

Please sign in to comment.