Merge pull request #26575 from mwielgus/gke-token-src

Automatic merge from submit-queue

Pass /etc/gce.conf to cluster autoscaler if needed

cc: @vulpecula @piosz @jszczepkowski @fgrzadkowski
This commit is contained in:
k8s-merge-robot
2016-06-01 09:42:45 -07:00
4 changed files with 25 additions and 1 deletions

View File

@@ -1,5 +1,14 @@
{% if pillar.get('enable_node_autoscaler', '').lower() == 'true' %}
{% set params = pillar['autoscaler_mig_config'] -%}
{% set cloud_config = "" -%}
{% set cloud_config_mount = "" -%}
{% set cloud_config_volume = "" -%}
{% if grains.cloud == 'gce' and grains.cloud_config is defined -%}
{% set cloud_config = "--cloud-config=" + grains.cloud_config -%}
{% 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 -%}
{
"kind": "Pod",
"apiVersion": "v1",
@@ -36,6 +45,7 @@
}
},
"volumeMounts": [
{{cloud_config_mount}}
{
"name": "ssl-certs",
"readOnly": true,
@@ -47,6 +57,7 @@
}
],
"volumes": [
{{cloud_config_volume}}
{
"name": "ssl-certs",
"hostPath": {