Support use of NETWORK_PROVIDER=cni with KUBERNETES_PROVIDER=vagrant for a kube-up.

Use of NETWORK_PROVIDER=cni is documented as useable (as well as it's affects on the runtime args of kubelet),
however the actual implimentation in the salt automation doesnt seem to exist.
this change attempts to fix that for the vagrant usecase.
This commit is contained in:
Matt Johnson 2016-03-29 19:24:03 +01:00
parent 5470488aa5
commit 46e6df655f
3 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,9 @@
{% if pillar.get('network_provider', '').lower() == 'kubenet' %}
{% set bridge_opts = "" %}
{% endif -%}
{% if pillar.get('network_provider', '').lower() == 'cni' %}
{% set bridge_opts = "" %}
{% endif -%}
{% set log_level = "--log-level=warn" -%}
{% if pillar['docker_test_log_level'] is defined -%}
{% set log_level = pillar['docker_test_log_level'] -%}

View File

@ -144,6 +144,8 @@
{% set network_plugin = "" -%}
{% if pillar.get('network_provider', '').lower() == 'opencontrail' %}
{% set network_plugin = "--network-plugin=opencontrail" %}
{% elif pillar.get('network_provider', '').lower() == 'cni' %}
{% set network_plugin = "--network-plugin=cni --network-plugin-dir=/etc/cni/net.d/" %}
{% elif pillar.get('network_provider', '').lower() == 'kubenet' %}
{% set network_plugin = "--network-plugin=kubenet" -%}
{% if reconcile_cidr_args == '' -%}

View File

@ -17,6 +17,8 @@ base:
- flannel
{% elif pillar.get('network_provider', '').lower() == 'kubenet' %}
- cni
{% elif pillar.get('network_provider', '').lower() == 'cni' %}
- cni
{% endif %}
- helpers
- kube-client-tools
@ -49,6 +51,8 @@ base:
- flannel
{% elif pillar.get('network_provider', '').lower() == 'kubenet' %}
- cni
{% elif pillar.get('network_provider', '').lower() == 'cni' %}
- cni
{% endif %}
- kube-apiserver
- kube-controller-manager