From 9f9f70aade00198bf19f3fa9f32485018ac783e9 Mon Sep 17 00:00:00 2001 From: Erik Stidham Date: Mon, 7 Aug 2017 10:33:37 -0500 Subject: [PATCH] Update Calico to 2.4.1 release. - Switched Calico images to be pulled from quay.io - Updated Canal too --- roles/download/defaults/main.yml | 17 +++++++++-------- .../calico/templates/calico-node.service.j2 | 1 + .../calico/templates/calico.env.j2 | 5 +++++ .../canal/templates/canal-node.yml.j2 | 3 +++ roles/uploads/defaults/main.yml | 4 ++-- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index e5a4aa31b..4691818c1 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -22,9 +22,10 @@ kube_version: v1.7.3 etcd_version: v3.2.4 #TODO(mattymo): Move calico versions to roles/network_plugins/calico/defaults # after migration to container download -calico_version: "v1.1.3" -calico_cni_version: "v1.8.0" -calico_policy_version: "v0.5.4" +calico_version: "v2.4.1" +calico_ctl_version: "v1.4.0" +calico_cni_version: "v1.10.0" +calico_policy_version: "v0.7.0" weave_version: 2.0.1 flannel_version: v0.8.0 pod_infra_version: 3.0 @@ -42,13 +43,13 @@ etcd_image_repo: "quay.io/coreos/etcd" etcd_image_tag: "{{ etcd_version }}" flannel_image_repo: "quay.io/coreos/flannel" flannel_image_tag: "{{ flannel_version }}" -calicoctl_image_repo: "calico/ctl" -calicoctl_image_tag: "{{ calico_version }}" -calico_node_image_repo: "calico/node" +calicoctl_image_repo: "quay.io/calico/ctl" +calicoctl_image_tag: "{{ calico_ctl_version }}" +calico_node_image_repo: "quay.io/calico/node" calico_node_image_tag: "{{ calico_version }}" -calico_cni_image_repo: "calico/cni" +calico_cni_image_repo: "quay.io/calico/cni" calico_cni_image_tag: "{{ calico_cni_version }}" -calico_policy_image_repo: "calico/kube-policy-controller" +calico_policy_image_repo: "quay.io/calico/kube-policy-controller" calico_policy_image_tag: "{{ calico_policy_version }}" calico_rr_image_repo: "quay.io/calico/routereflector" calico_rr_image_tag: "v0.3.0" diff --git a/roles/network_plugin/calico/templates/calico-node.service.j2 b/roles/network_plugin/calico/templates/calico-node.service.j2 index 015c91b08..73bb757ba 100644 --- a/roles/network_plugin/calico/templates/calico-node.service.j2 +++ b/roles/network_plugin/calico/templates/calico-node.service.j2 @@ -11,6 +11,7 @@ ExecStart={{ docker_bin_dir }}/docker run --net=host --privileged \ -e HOSTNAME=${CALICO_HOSTNAME} \ -e IP=${CALICO_IP} \ -e IP6=${CALICO_IP6} \ + -e CLUSTER_TYPE=${CLUSTER_TYPE} \ -e CALICO_NETWORKING_BACKEND=${CALICO_NETWORKING_BACKEND} \ -e FELIX_DEFAULTENDPOINTTOHOSTACTION={{ calico_endpoint_to_host_action|default('RETURN') }} \ -e AS=${CALICO_AS} \ diff --git a/roles/network_plugin/calico/templates/calico.env.j2 b/roles/network_plugin/calico/templates/calico.env.j2 index 83cf8f291..e438060af 100644 --- a/roles/network_plugin/calico/templates/calico.env.j2 +++ b/roles/network_plugin/calico/templates/calico.env.j2 @@ -4,6 +4,11 @@ ETCD_CERT_FILE="{{ calico_cert_dir }}/cert.crt" ETCD_KEY_FILE="{{ calico_cert_dir }}/key.pem" CALICO_IP="{{ip | default(ansible_default_ipv4.address) }}" CALICO_IP6="" +{% if calico_network_backend is defined and calico_network_backend == 'none' %} +CLUSTER_TYPE="kubespray" +{% else %} +CLUSTER_TYPE="kubespray,bgp" +{% endif %} {% if calico_network_backend is defined %} CALICO_NETWORKING_BACKEND="{{calico_network_backend }}" {% endif %} diff --git a/roles/network_plugin/canal/templates/canal-node.yml.j2 b/roles/network_plugin/canal/templates/canal-node.yml.j2 index 37baf06e0..b4d8e67f0 100644 --- a/roles/network_plugin/canal/templates/canal-node.yml.j2 +++ b/roles/network_plugin/canal/templates/canal-node.yml.j2 @@ -143,6 +143,9 @@ spec: # Disable Calico BGP. Calico is simply enforcing policy. - name: CALICO_NETWORKING value: "false" + # Cluster type to identify the deployment type + - name: CLUSTER_TYPE + value: "kubespray,canal" # Disable file logging so `kubectl logs` works. - name: CALICO_DISABLE_FILE_LOGGING value: "true" diff --git a/roles/uploads/defaults/main.yml b/roles/uploads/defaults/main.yml index 303a2d050..bc0a17f32 100644 --- a/roles/uploads/defaults/main.yml +++ b/roles/uploads/defaults/main.yml @@ -3,8 +3,8 @@ local_release_dir: /tmp # Versions etcd_version: v3.0.17 -calico_version: v0.23.0 -calico_cni_version: v1.5.6 +calico_version: v2.4.1 +calico_cni_version: v1.10.0 weave_version: v2.0.1 # Download URL's