diff --git a/cluster/saltbase/salt/sdn/init.sls b/cluster/saltbase/salt/sdn/init.sls index 4b6a0e5274b..2d69a53e5d7 100644 --- a/cluster/saltbase/salt/sdn/init.sls +++ b/cluster/saltbase/salt/sdn/init.sls @@ -1,4 +1,4 @@ -{% if grains['os_family'] == 'RedHat' %} +{% if grains.network_mode is defined and grains.network_mode == 'openvswitch' %} openvswitch: pkg: diff --git a/cluster/vagrant/provision-master.sh b/cluster/vagrant/provision-master.sh index 127573fc5df..63ed10231dd 100755 --- a/cluster/vagrant/provision-master.sh +++ b/cluster/vagrant/provision-master.sh @@ -37,6 +37,7 @@ cat </etc/salt/minion.d/grains.conf grains: node_ip: $MASTER_IP master_ip: $MASTER_IP + network_mode: openvswitch etcd_servers: $MASTER_IP cloud_provider: vagrant roles: diff --git a/cluster/vagrant/provision-minion.sh b/cluster/vagrant/provision-minion.sh index 0781b322f5b..b99bfb9e53a 100755 --- a/cluster/vagrant/provision-minion.sh +++ b/cluster/vagrant/provision-minion.sh @@ -44,6 +44,7 @@ echo "master: $MASTER_NAME" > /etc/salt/minion.d/master.conf # Our minions will have a pool role to distinguish them from the master. cat </etc/salt/minion.d/grains.conf grains: + network_mode: openvswitch node_ip: $MINION_IP etcd_servers: $MASTER_IP roles: diff --git a/docs/salt.md b/docs/salt.md index 8c29baf5527..109cdd340db 100644 --- a/docs/salt.md +++ b/docs/salt.md @@ -59,6 +59,7 @@ hostnamef | (Optional) The full host name of the machine, i.e. hostname -f master_ip | (Optional) The IP address that the apiserver will bind against node_ip | (Optional) The IP address to use to address this node minion_ip | (Optional) Mapped to the kubelet hostname_override, K8S TODO - change this name +network_mode | (Optional) Networking model to use among nodes: *openvswitch* roles | (Required) 1. **kubernetes-master** means this machine is the master in the kubernetes cluster. 2. **kubernetes-pool** means this machine is a kubernetes-minion. Depending on the role, the Salt scripts will provision different resources on the machine. These keys may be leveraged by the Salt sls files to branch behavior.