choose between gce and aws cloud providers

This commit is contained in:
Smaine Kahlouch
2016-03-23 17:27:06 +01:00
parent f49926413a
commit 68fafd030d
7 changed files with 22 additions and 14 deletions

View File

@@ -1,4 +1,6 @@
---
# Enables Internet connectivity from containers
nat_outgoing: true
# cloud_provider: no
# cloud_provider can only be set to 'gce' or 'aws'
# cloud_provider:

View File

@@ -51,19 +51,19 @@
- 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)
when: calico_conf.status == 404 and cloud_provider is not defined
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
when: calico_conf.status == 404 and cloud_provider is defined
- 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)
when: calico_conf.status == 404 and cloud_provider is not defined
and nat_outgoing|default(false) and not peer_with_router|default(false)
- name: Calico | Get calico configuration from etcd