Use download binary instead of copying from the container (#3786)

This commit is contained in:
Rong Zhang
2018-12-03 18:22:17 +08:00
committed by Kubernetes Prow Robot
parent ffcea384a6
commit e0781483fa
8 changed files with 97 additions and 67 deletions

View File

@@ -1,12 +1,4 @@
---
- name: Cloud | Copy cni plugins from hyperkube
command: "{{ docker_bin_dir }}/docker run --rm -v /opt/cni/bin:/cnibindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /bin/cp -rf /opt/cni/bin/. /cnibindir/"
register: cni_task_result
until: cni_task_result.rc == 0
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
changed_when: false
- name: Cloud | Set cni directory permissions
file:
path: /opt/cni/bin
@@ -14,3 +6,10 @@
owner: kube
recurse: true
mode: "u=rwX,g-rwx,o-rwx"
- name: Canal | Copy cni plugins
unarchive:
src: "{{ local_release_dir }}/cni-plugins-{{ image_arch }}-{{ cni_version }}.tgz"
dest: "/opt/cni/bin"
mode: 0755
remote_src: yes