Browse Source

Merge pull request #268 from rsmitty/issue-265

provides initial docker options support
pull/273/head
Smaine Kahlouch 8 years ago
parent
commit
e8f97aa437
4 changed files with 10 additions and 6 deletions
  1. 4
      inventory/group_vars/all.yml
  2. 6
      roles/network_plugin/calico/templates/docker
  3. 4
      roles/network_plugin/flannel/templates/docker
  4. 2
      roles/network_plugin/weave/templates/docker

4
inventory/group_vars/all.yml

@ -128,3 +128,7 @@ dns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(2)|ipaddr('address')
#http_proxy: "" #http_proxy: ""
#https_proxy: "" #https_proxy: ""
#no_proxy: "" #no_proxy: ""
##A string of extra options to pass to the docker daemon.
##This string should be exactly as you wish it to appear.
#docker_options: ""

6
roles/network_plugin/calico/templates/docker

@ -1,8 +1,8 @@
# Deployed by Ansible # Deployed by Ansible
{% if ansible_service_mgr in ["sysvinit","upstart"] and kube_network_plugin == "flannel" and ansible_os_family == "Debian" %} {% if ansible_service_mgr in ["sysvinit","upstart"] and kube_network_plugin == "flannel" and ansible_os_family == "Debian" %}
DOCKER_OPTS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }}"
DOCKER_OPTS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }} {% if docker_options is defined %}{{ docker_options }}{% endif %}"
{% elif kube_network_plugin == "flannel" and ansible_os_family == "RedHat" %} {% elif kube_network_plugin == "flannel" and ansible_os_family == "RedHat" %}
DOCKER_NETWORK_OPTIONS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }}"
DOCKER_NETWORK_OPTIONS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }} {% if docker_options is defined %}{{ docker_options }}{% endif %}"
{% elif kube_network_plugin == "flannel" %} {% elif kube_network_plugin == "flannel" %}
OPTIONS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }}"
OPTIONS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }} {% if docker_options is defined %}{{ docker_options }}{% endif %}"
{% endif %} {% endif %}

4
roles/network_plugin/flannel/templates/docker

@ -1,7 +1,7 @@
# Deployed by Ansible # Deployed by Ansible
{% if (ansible_service_mgr in ["sysvinit","upstart"] and kube_network_plugin == "flannel" and ansible_os_family == "Debian") or {% if (ansible_service_mgr in ["sysvinit","upstart"] and kube_network_plugin == "flannel" and ansible_os_family == "Debian") or
(kube_network_plugin == "flannel" and ansible_os_family == "CoreOS") %} (kube_network_plugin == "flannel" and ansible_os_family == "CoreOS") %}
DOCKER_OPTS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }}"
DOCKER_OPTS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }} {% if docker_options is defined %}{{ docker_options }}{% endif %}"
{% elif kube_network_plugin == "flannel" %} {% elif kube_network_plugin == "flannel" %}
OPTIONS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }}"
OPTIONS="--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }} {% if docker_options is defined %}{{ docker_options }}{% endif %}"
{% endif %} {% endif %}

2
roles/network_plugin/weave/templates/docker

@ -1,2 +1,2 @@
# Deployed by Ansible # Deployed by Ansible
DOCKER_OPTS=""
DOCKER_OPTS="{% if docker_options is defined %}{{ docker_options }}{% endif %}"
Loading…
Cancel
Save