mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-04 02:58:17 -03:30
Remove hard dependence on facts for all nodes (#4304)
* Remove hard dependence on facts for all nodes * Update main.yaml * Update main.yaml
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
adf6a7121f
commit
acbf3db233
@@ -3,7 +3,7 @@
|
||||
kube_apiserver_insecure_bind_address: 127.0.0.1
|
||||
|
||||
# advertised host IP for kubelet. This affects network plugin config. Take caution
|
||||
kubelet_address: "{{ ip | default(ansible_default_ipv4['address']) }}"
|
||||
kubelet_address: "{{ ip | default(fallback_ips[inventory_hostname]) }}"
|
||||
|
||||
# bind address for kubelet. Set to 0.0.0.0 to listen on all interfaces
|
||||
kubelet_bind_address: "{{ ip | default('0.0.0.0') }}"
|
||||
|
||||
@@ -11,7 +11,7 @@ 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 }};
|
||||
server {{ hostvars[host]['access_ip'] | default(hostvars[host]['ip'] | default(fallback_ips[host])) }}:{{ kube_apiserver_port }};
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user