mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-02 23:02:25 +00:00
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:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user