|
57 | 57 | {% set etcd_servers = "--etcd-servers=http://127.0.0.1:4001" -%}
|
58 | 58 | {% set etcd_servers_overrides = "--etcd-servers-overrides=/events#http://127.0.0.1:4002" -%}
|
59 | 59 |
|
| 60 | +{% set target_ram_mb = "" -%} |
| 61 | +{% if pillar['num_nodes'] is defined -%} |
| 62 | + # Set amount of memory available for apiserver based on number of nodes. |
| 63 | + # TODO: Once we start setting proper requests and limits for apiserver |
| 64 | + # we should reuse the same logic here instead of current heuristic. |
| 65 | + {% set tmp_ram_mb = pillar['num_nodes']|int * 60 %} |
| 66 | + {% set target_ram_mb = "--target-ram-mb=" + tmp_ram_mb|string -%} |
| 67 | +{% endif -%} |
| 68 | + |
60 | 69 | {% set service_cluster_ip_range = "" -%}
|
61 | 70 | {% if pillar['service_cluster_ip_range'] is defined -%}
|
62 | 71 | {% set service_cluster_ip_range = "--service-cluster-ip-range=" + pillar['service_cluster_ip_range'] -%}
|
|
124 | 133 |
|
125 | 134 | {% set enable_garbage_collector = "" -%}
|
126 | 135 | {% if pillar['enable_garbage_collector'] is defined -%}
|
127 |
| -{% set enable_garbage_collector = "--enable-garbage-collector=" + pillar['enable_garbage_collector'] -%} |
| 136 | + {% set enable_garbage_collector = "--enable-garbage-collector=" + pillar['enable_garbage_collector'] -%} |
128 | 137 | {% endif -%}
|
129 | 138 |
|
130 |
| -{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector -%} |
| 139 | +{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + target_ram_mb + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector -%} |
131 | 140 | {% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + token_auth_file + " " + bind_address + " " + log_level + " " + advertise_address + " " + proxy_ssh_options + authz_mode + abac_policy_file + webhook_authentication_config + webhook_authorization_config -%}
|
132 | 141 |
|
133 | 142 | # test_args has to be kept at the end, so they'll overwrite any prior configuration
|
134 | 143 | {% if pillar['apiserver_test_args'] is defined -%}
|
135 |
| -{% set params = params + " " + pillar['apiserver_test_args'] -%} |
| 144 | + {% set params = params + " " + pillar['apiserver_test_args'] -%} |
136 | 145 | {% endif -%}
|
137 | 146 |
|
138 | 147 | {
|
|
0 commit comments