GoogleCloudPlatform/kubernetes — pull request #1120 by doublerr (2014-08-30 00:40:23+00:00)
Title: Rackspace: fix apiserver salt config

The fix for issue https://github.com/GoogleCloudPlatform/kubernetes/issues/1089 broke the Rackspace configuration. This PR is restoring working functionality and making a few additional changes:

1. Use minion's ip addresses from eth2 for apiserver
2. Complete the basic sanity checking
3. move etcd communication off eth0 and onto eth2

NOTE: I used a non-standard jinja function, `do` to avoid the bash array. I tested this on our Wheezy image and didn't see a problem but please confirm this doesn't cause any jijna template problems on GCE:

```python
{%- if grains.cloud == 'rackspace' %}
{%- set ip_addrs = [] %}
{%- for addrs in salt['mine.get']('roles:kubernetes-pool', 'grains.items', expr_form='grain').values() %}
{%- do ip_addrs.append(addrs.ip_interfaces.eth2[0]) %}
{%- endfor %}
MACHINES="{{ip_addrs|join(',')}}"
{%- set machines = "-machines=$MACHINES" %}
{%- set minion_regexp = "" %}
{% endif %}
```

Any comments welcome.

This isn't a rush so we can wait till Monday seeing as it's late Friday afternoon.