mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Merge pull request #8722 from roberthbailey/dead-flags-salt
Remove deprecated nodecontroller flags from the salt configuration.
This commit is contained in:
commit
b76dd0e585
@ -1,13 +1,7 @@
|
||||
{% set machines = ""-%}
|
||||
{% set cluster_name = "" -%}
|
||||
{% set cluster_cidr = "" -%}
|
||||
{% set allocate_node_cidrs = "" -%}
|
||||
{% set minion_regexp = "--minion_regexp=.*" -%}
|
||||
{% set sync_nodes = "--sync_nodes=true" -%}
|
||||
|
||||
{% if pillar['node_instance_prefix'] is defined -%}
|
||||
{% set minion_regexp = "--minion_regexp='" + pillar['node_instance_prefix'] + ".*'" -%}
|
||||
{% endif -%}
|
||||
{% if pillar['instance_prefix'] is defined -%}
|
||||
{% set cluster_name = "--cluster_name=" + pillar['instance_prefix'] -%}
|
||||
{% endif -%}
|
||||
@ -23,41 +17,14 @@
|
||||
|
||||
{% if grains.cloud is defined -%}
|
||||
{% set cloud_provider = "--cloud_provider=" + grains.cloud -%}
|
||||
|
||||
{% set service_account_key = " --service_account_private_key_file=/srv/kubernetes/server.key " -%}
|
||||
|
||||
{% if grains.cloud == 'gce' -%}
|
||||
{% if grains.cloud_config is defined -%}
|
||||
{% if grains.cloud in [ 'aws', 'gce' ] and grains.cloud_config is defined -%}
|
||||
{% set cloud_config = "--cloud_config=" + grains.cloud_config -%}
|
||||
{% endif -%}
|
||||
|
||||
{% elif grains.cloud == 'aws' -%}
|
||||
{% if grains.cloud_config is defined -%}
|
||||
{% set cloud_config = "--cloud_config=" + grains.cloud_config -%}
|
||||
{% endif -%}
|
||||
{% set machines = "--machines=" + ','.join(salt['mine.get']('roles:kubernetes-pool', 'network.ip_addrs', expr_form='grain').keys()) -%}
|
||||
|
||||
{% elif grains.cloud == 'azure' -%}
|
||||
{% set machines = "--machines=" + salt['mine.get']('roles:kubernetes-pool', 'grains.items', expr_form='grain').values()|join(',', attribute='hostnamef') -%}
|
||||
|
||||
{% elif grains.cloud == 'vsphere' -%}
|
||||
# Collect IPs of minions as machines list.
|
||||
{% set machines= "" -%}
|
||||
{% for addrs in salt['mine.get']('roles:kubernetes-pool', 'network.ip_addrs', expr_form='grain').values() -%}
|
||||
{% if loop.first -%}
|
||||
machines="--machines=";
|
||||
{% endif -%}
|
||||
{% set machines = machines + addrs[0] %}
|
||||
{% if not loop.last -%}
|
||||
{% set machines = machines + "," %}
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% set minion_regexp = "" -%}
|
||||
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% set params = "--master=127.0.0.1:8080" + " " + machines + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + minion_regexp + " " + cloud_provider + " " + sync_nodes + " " + cloud_config + service_account_key + pillar['log_level'] -%}
|
||||
{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + cloud_provider + " " + cloud_config + service_account_key + pillar['log_level'] -%}
|
||||
|
||||
{
|
||||
"apiVersion": "v1beta3",
|
||||
|
Loading…
Reference in New Issue
Block a user