From 2a4fc70e1cc4ad2abbe6beaf370bfb2bbd6727ae Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Mon, 28 May 2018 11:11:18 +0200 Subject: [PATCH 1/3] contiv-etcd-init image as default instead hardcoded --- roles/network_plugin/contiv/defaults/main.yml | 3 +++ roles/network_plugin/contiv/templates/contiv-etcd.yml.j2 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/network_plugin/contiv/defaults/main.yml b/roles/network_plugin/contiv/defaults/main.yml index b6e237df5..11c6e79a9 100644 --- a/roles/network_plugin/contiv/defaults/main.yml +++ b/roles/network_plugin/contiv/defaults/main.yml @@ -15,6 +15,9 @@ contiv_etcd_endpoints: |- contiv_etcd{{ loop.index }}=http://{{ hostvars[host]['ip'] | default(hostvars[host].ansible_default_ipv4['address']) }}:{{ contiv_etcd_peer_port }}{% if not loop.last %},{% endif %} {%- endfor %} +contiv_etcd_init_image_repo: ferest/etcd-initer +contiv_etcd_init_image_tag: latest + # Parameters for Contiv api-proxy contiv_enable_api_proxy: true contiv_api_proxy_port: 10000 diff --git a/roles/network_plugin/contiv/templates/contiv-etcd.yml.j2 b/roles/network_plugin/contiv/templates/contiv-etcd.yml.j2 index a6e9121d4..9d7502857 100644 --- a/roles/network_plugin/contiv/templates/contiv-etcd.yml.j2 +++ b/roles/network_plugin/contiv/templates/contiv-etcd.yml.j2 @@ -26,7 +26,7 @@ spec: effect: NoSchedule initContainers: - name: contiv-etcd-init - image: ferest/etcd-initer:latest + image: {{ contiv_etcd_init_image_repo }}:{{ contiv_etcd_init_image_tag }} imagePullPolicy: Always env: - name: ETCD_INIT_ARGSFILE From 3673ed6262cd61125b70433e184b79ffad37ee08 Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Tue, 29 May 2018 17:05:33 +0200 Subject: [PATCH 2/3] include contiv_etcd_init_image to downloads role --- roles/download/defaults/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index 4a6965ad5..286a3ec4c 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -105,6 +105,8 @@ contiv_image_repo: "contiv/netplugin" contiv_image_tag: "{{ contiv_version }}" contiv_auth_proxy_image_repo: "contiv/auth_proxy" contiv_auth_proxy_image_tag: "{{ contiv_version }}" +contiv_etcd_init_image_repo: "ferest/etcd-initer" +contiv_etcd_init_image_tag: latest cilium_image_repo: "docker.io/cilium/cilium" cilium_image_tag: "{{ cilium_version }}" nginx_image_repo: nginx @@ -383,6 +385,14 @@ downloads: sha256: "{{ contiv_auth_proxy_digest_checksum|default(None) }}" groups: - k8s-cluster + contiv_etcd_init: + enabled: "{{ kube_network_plugin == 'contiv' }}" + container: true + repo: "{{ contiv_etcd_init_image_repo }}" + tag: "{{ contiv_etcd_init_image_tag }}" + sha256: "{{ contiv_etcd_init_digest_checksum|default(None) }}" + groups: + - k8s-cluster pod_infra: enabled: true container: true From 11d87ecc37659a8924b24408fe47c9f854394e5e Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Thu, 31 May 2018 00:02:11 +0200 Subject: [PATCH 3/3] removed surnumerary definition of contiv_etcd_init_image_* (already in download role) --- roles/network_plugin/contiv/defaults/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/roles/network_plugin/contiv/defaults/main.yml b/roles/network_plugin/contiv/defaults/main.yml index 11c6e79a9..b6e237df5 100644 --- a/roles/network_plugin/contiv/defaults/main.yml +++ b/roles/network_plugin/contiv/defaults/main.yml @@ -15,9 +15,6 @@ contiv_etcd_endpoints: |- contiv_etcd{{ loop.index }}=http://{{ hostvars[host]['ip'] | default(hostvars[host].ansible_default_ipv4['address']) }}:{{ contiv_etcd_peer_port }}{% if not loop.last %},{% endif %} {%- endfor %} -contiv_etcd_init_image_repo: ferest/etcd-initer -contiv_etcd_init_image_tag: latest - # Parameters for Contiv api-proxy contiv_enable_api_proxy: true contiv_api_proxy_port: 10000