Merge pull request #691 from adidenko/calico-old-cni-fix

Fix possible problems with legacy calicoctl
pull/700/head
Bogdan Dobrelya 2016-12-08 12:00:08 +01:00 committed by GitHub
commit 710d5ae48e
2 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,9 @@
--- ---
- name: Calico | Check calicoctl version
run_once: true
set_fact:
legacy_calicoctl: "{{ calicoctl_image_tag | version_compare('v1.0.0', '<') }}"
- name: Calico | Write Calico cni config - name: Calico | Write Calico cni config
template: template:
src: "cni-calico.conf.j2" src: "cni-calico.conf.j2"
@ -71,11 +76,6 @@
delegate_to: "{{groups['etcd'][0]}}" delegate_to: "{{groups['etcd'][0]}}"
run_once: true run_once: true
- name: Calico | Check calicoctl version
run_once: true
set_fact:
legacy_calicoctl: "{{ calicoctl_image_tag | version_compare('v1.0.0', '<') }}"
- name: Calico | Configure calico network pool - name: Calico | Configure calico network pool
shell: > shell: >
echo '{ echo '{

View File

@ -1,6 +1,8 @@
{ {
"name": "calico-k8s-network", "name": "calico-k8s-network",
{% if not legacy_calicoctl %}
"hostname": "{{ inventory_hostname }}", "hostname": "{{ inventory_hostname }}",
{% endif %}
"type": "calico", "type": "calico",
"etcd_endpoints": "{{ etcd_access_endpoint }}", "etcd_endpoints": "{{ etcd_access_endpoint }}",
"etcd_cert_file": "{{ etcd_cert_dir }}/node.pem", "etcd_cert_file": "{{ etcd_cert_dir }}/node.pem",