Use apiserver instead of etcd for kube-proxy.

For cloud-providers that use salt, have kube-proxy use
apiserver instead of etcd as a config source.
This commit is contained in:
Eric Tune
2014-12-02 11:01:24 -08:00
parent ffcbe2fa10
commit 65b38e7af7
3 changed files with 6 additions and 4 deletions

View File

@@ -2,11 +2,11 @@
{% if grains['os_family'] == 'RedHat' -%}
{% set daemon_args = "" -%}
{% endif -%}
{% if grains.etcd_servers is defined -%}
{% set etcd_servers = "-etcd_servers=http://" + grains.etcd_servers + ":4001" -%}
{% if grains.api_servers is defined -%}
{% set api_servers = "-master=http://" + grains.api_servers + ":7080" -%}
{% else -%}
{% set ips = salt['mine.get']('roles:kubernetes-master', 'network.ip_addrs', 'grain').values() -%}
{% set etcd_servers = "-etcd_servers=http://" + ips[0][0] + ":4001" -%}
{% set api_servers = "-master=http://" + ips[0][0] + ":7080" -%}
{% endif -%}
DAEMON_ARGS="{{daemon_args}} {{etcd_servers}}"
DAEMON_ARGS="{{daemon_args}} {{api_servers}}"