dacfbde0b0
* Leave all.yml to keep only optional vars * Store groups' specific vars by existing group names * Fix optional vars casted as mandatory (add default()) * Fix missing defaults for an optional IP var * Relink group_vars for terraform to reflect changes Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
26 lines
689 B
Django/Jinja
26 lines
689 B
Django/Jinja
error_log stderr notice;
|
|
|
|
worker_processes auto;
|
|
events {
|
|
multi_accept on;
|
|
use epoll;
|
|
worker_connections 1024;
|
|
}
|
|
|
|
stream {
|
|
upstream kube_apiserver {
|
|
least_conn;
|
|
{% for host in groups['kube-master'] -%}
|
|
server {{ hostvars[host]['access_ip'] | default(hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address'])) }}:{{ kube_apiserver_port }};
|
|
{% endfor %}
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:{{ nginx_kube_apiserver_port|default(kube_apiserver_port) }};
|
|
proxy_pass kube_apiserver;
|
|
proxy_timeout 10m;
|
|
proxy_connect_timeout 1s;
|
|
|
|
}
|
|
|
|
}
|