Restart kubelet on update in deployment-type host on update (#1759)

* Restart kubelet on update in deployment-type host on update

* Update install_host.yml

* Update install_host.yml

* Update install_host.yml
This commit is contained in:
Julian Poschmann 2017-10-15 21:22:17 +02:00 committed by Matthew Mosesohn
parent 7e4668859b
commit 66e5e14bac

View file

@ -1,11 +1,23 @@
---
- name: install | Compare host kubelet with hyperkube container
command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/systembindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /usr/bin/cmp /hyperkube /systembindir/kubelet"
register: kubelet_task_compare_result
until: kubelet_task_compare_result.rc in [0,1,2]
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
changed_when: false
failed_when: "kubelet_task_compare_result.rc not in [0,1,2]"
tags:
- hyperkube
- upgrade
- name: install | Copy kubelet from hyperkube container
command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/systembindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /bin/cp -f /hyperkube /systembindir/kubelet"
when: kubelet_task_compare_result.rc != 0
register: kubelet_task_result
until: kubelet_task_result.rc == 0
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
changed_when: false
tags:
- hyperkube
- upgrade