diff --git a/cluster/common.sh b/cluster/common.sh index 9b7cb72142..502abfbb81 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -872,6 +872,7 @@ EOF cat >>$file <>/srv/salt-overlay/pillar/cluster-params.sls enable_cluster_autoscaler: '$(echo "${ENABLE_CLUSTER_AUTOSCALER}" | sed -e "s/'/''/g")' autoscaler_mig_config: '$(echo "${AUTOSCALER_MIG_CONFIG}" | sed -e "s/'/''/g")' +autoscaler_expander_config: '$(echo "${AUTOSCALER_EXPANDER_CONFIG}" | sed -e "s/'/''/g")' EOF fi if [ -n "${SCHEDULING_ALGORITHM_PROVIDER:-}" ]; then diff --git a/cluster/gce/container-linux/configure-helper.sh b/cluster/gce/container-linux/configure-helper.sh index c6dcdd5287..04feb92daa 100755 --- a/cluster/gce/container-linux/configure-helper.sh +++ b/cluster/gce/container-linux/configure-helper.sh @@ -1134,7 +1134,7 @@ function start-cluster-autoscaler { local -r src_file="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/cluster-autoscaler.manifest" remove-salt-config-comments "${src_file}" - local params="${AUTOSCALER_MIG_CONFIG} ${CLOUD_CONFIG_OPT}" + local params="${AUTOSCALER_MIG_CONFIG} ${CLOUD_CONFIG_OPT} ${AUTOSCALER_EXPANDER_CONFIG:-}" sed -i -e "s@{{params}}@${params}@g" "${src_file}" sed -i -e "s@{{cloud_config_mount}}@${CLOUD_CONFIG_MOUNT}@g" "${src_file}" sed -i -e "s@{{cloud_config_volume}}@${CLOUD_CONFIG_VOLUME}@g" "${src_file}" diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 23b026fa87..d734ba353b 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -1560,7 +1560,7 @@ function start-cluster-autoscaler { local -r src_file="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/cluster-autoscaler.manifest" remove-salt-config-comments "${src_file}" - local params="${AUTOSCALER_MIG_CONFIG} ${CLOUD_CONFIG_OPT}" + local params="${AUTOSCALER_MIG_CONFIG} ${CLOUD_CONFIG_OPT} ${AUTOSCALER_EXPANDER_CONFIG:-}" sed -i -e "s@{{params}}@${params}@g" "${src_file}" sed -i -e "s@{{cloud_config_mount}}@${CLOUD_CONFIG_MOUNT}@g" "${src_file}" sed -i -e "s@{{cloud_config_volume}}@${CLOUD_CONFIG_VOLUME}@g" "${src_file}" diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 957340b189..311d7f1a0b 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1298,7 +1298,7 @@ function create-autoscaler-config() { # Create autoscaler for nodes configuration if requested if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then create-cluster-autoscaler-mig-config - echo "Using autoscaler config: ${AUTOSCALER_MIG_CONFIG}" + echo "Using autoscaler config: ${AUTOSCALER_MIG_CONFIG} ${AUTOSCALER_EXPANDER_CONFIG}" fi } diff --git a/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest b/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest index ea54487c92..eb8fc5bf93 100644 --- a/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest +++ b/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest @@ -7,7 +7,7 @@ {% set cloud_config_mount = "{\"name\": \"cloudconfigmount\",\"mountPath\": \"" + grains.cloud_config + "\", \"readOnly\": true}," -%} {% set cloud_config_volume = "{\"name\": \"cloudconfigmount\",\"hostPath\": {\"path\": \"" + grains.cloud_config + "\"}}," -%} {% endif -%} -{% set params = pillar['autoscaler_mig_config'] + " " + cloud_config -%} +{% set params = pillar['autoscaler_mig_config'] + " " + cloud_config + " " + pillar.get('autoscaler_expander_config', '') -%} { "kind": "Pod",