Update flannel use install-cni-plugin to fit upstream (#8714)

* Update flannel use install-cni-plugin to fit upstream

* Replace flannel cni repo

* Remove download flannel binary
This commit is contained in:
zhengtianbao
2022-04-19 00:44:41 +08:00
committed by GitHub
parent 3261d26181
commit 937e64d296
3 changed files with 23 additions and 38 deletions

View File

@@ -1,16 +1,4 @@
---
- name: runc | Download flannel binary
include_tasks: "../../../download/tasks/download_file.yml"
vars:
download: "{{ download_defaults | combine(downloads.flannel_cni) }}"
- name: Copy flannel binary from download dir
copy:
src: "{{ downloads.flannel_cni.dest }}"
dest: "/opt/cni/bin/flannel"
mode: 0755
remote_src: true
- name: Flannel | Create Flannel manifests
template:
src: "{{ item.file }}.j2"

View File

@@ -108,6 +108,17 @@ spec:
values:
- {{ arch }}
initContainers:
- name: install-cni-plugin
image: {{ flannel_init_image_repo }}:{{ flannel_init_image_tag }}
command:
- cp
args:
- -f
- /flannel
- /opt/cni/bin/flannel
volumeMounts:
- name: cni-plugin
mountPath: /opt/cni/bin
- name: install-cni
image: {{ flannel_image_repo }}:{{ flannel_image_tag | regex_replace(image_arch,'') }}{{ arch }}
command:
@@ -135,7 +146,7 @@ spec:
- name: flannel-cfg
configMap:
name: kube-flannel-cfg
- name: host-cni-bin
- name: cni-plugin
hostPath:
path: /opt/cni/bin
updateStrategy: