Merge pull request #158 from Smana/calico_nat_outgoing_opt

calico: enabling nat outgoing by default
This commit is contained in:
Smaine Kahlouch 2016-02-24 12:11:34 +01:00
commit 3f32e5973f
2 changed files with 12 additions and 2 deletions

View file

@ -1,2 +1,4 @@
---
# Enables Internet connectivity from containers
nat_outgoing: true
# cloud_provider: no

View file

@ -48,15 +48,23 @@
register: calico_conf
run_once: true
- name: Calico | Configure calico network pool
command: "{{ bin_dir }}/calicoctl pool add {{ kube_pods_subnet }}"
run_once: true
when: calico_conf.status == 404 and (cloud_provider is not defined or cloud_provider != True)
and not nat_outgoing|default(false) or
(nat_outgoing|default(false) and peer_with_router|default(false))
- name: Calico | Configure calico network pool for cloud
command: "{{ bin_dir }}/calicoctl pool add {{ kube_pods_subnet }} --ipip --nat-outgoing"
run_once: true
when: calico_conf.status == 404 and cloud_provider is defined and cloud_provider == True
- name: Calico | Configure calico network pool
command: "{{ bin_dir }}/calicoctl pool add {{ kube_pods_subnet }}"
- name: Calico | Configure calico network pool with nat outgoing
command: "{{ bin_dir}}/calicoctl pool add {{ kube_pods_subnet }} --nat-outgoing"
run_once: true
when: calico_conf.status == 404 and (cloud_provider is not defined or cloud_provider != True)
and nat_outgoing|default(false) and not peer_with_router|default(false)
- name: Calico | Get calico configuration from etcd
uri: