Merge pull request #552 from MSOpenTech/azure-scripts

Update salt config for apiserver to support Azure.
This commit is contained in:
Daniel Smith
2014-07-24 12:46:53 -07:00
7 changed files with 15 additions and 4 deletions

View File

@@ -1,5 +1,11 @@
{%- set ips = salt['mine.get']('roles:kubernetes-master', 'network.ip_addrs', 'grain').values() %}
DAEMON_ARGS="$DAEMON_ARGS -etcd_servers=http://{{ ips[0][0] }}:4001 -minion_regexp '{{ pillar['instance_prefix'] }}.*'"
DAEMON_ARGS="$DAEMON_ARGS -etcd_servers=http://{{ ips[0][0] }}:4001"
{% if grains['cloud'] is defined and grains['cloud'] == 'gce' %}
DAEMON_ARGS="$DAEMON_ARGS -cloud_provider=gce -minion_regexp='{{ pillar['instance_prefix'] }}.*'"
MACHINES="{{ ','.join(salt['mine.get']('roles:kubernetes-pool', 'network.ip_addrs', expr_form='grain').keys()) }}"
DAEMON_ARGS="$DAEMON_ARGS --machines $MACHINES"
{% elif grains['cloud'] is defined and grains['cloud'] == 'azure' %}
MACHINES="{{ salt['mine.get']('roles:kubernetes-pool', 'grains.items', expr_form='grain').values()|join(',', attribute='hostnamef') }}"
{% endif %}
DAEMON_ARGS="$DAEMON_ARGS -machines=$MACHINES"

View File

@@ -78,4 +78,3 @@ apiserver:
- file: /etc/default/apiserver
- file: /usr/local/bin/apiserver
- file: /etc/init.d/apiserver

View File

@@ -17,7 +17,6 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="The Kubernetes API server"
NAME=apiserver
DAEMON=/usr/local/bin/apiserver
DAEMON_ARGS="-cloud_provider gce"
DAEMON_LOG_FILE=/var/log/$NAME.log
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME