fix apply for netchecker upgrade (#1659)

* fix apply for netchecker upgrade and graceful upgrade

* Speed up daemonset upgrades. Make check wait for ds upgrades.
This commit is contained in:
Matthew Mosesohn
2017-09-15 13:19:37 +01:00
committed by GitHub
parent 8d766a2ca9
commit b294db5aed
9 changed files with 21 additions and 21 deletions

View File

@@ -12,16 +12,11 @@
bin_dir: "/usr/local/bin"
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
- name: Check kubectl output
shell: "{{bin_dir}}/kubectl get pods --all-namespaces -owide"
register: get_pods
- debug: msg="{{get_pods.stdout.split('\n')}}"
- name: Get pod names
shell: "{{bin_dir}}/kubectl get pods -o json"
register: pods
until: '"ContainerCreating" not in pods.stdout'
until: '"ContainerCreating" not in pods.stdout and "Terminating" not in pods.stdout'
retries: 60
delay: 2
no_log: true
@@ -30,11 +25,20 @@
command: "{{bin_dir}}/kubectl get pods -o
jsonpath='{range .items[?(.spec.hostNetwork)]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'"
register: hostnet_pods
no_log: true
- name: Get running pods
command: "{{bin_dir}}/kubectl get pods -o
jsonpath='{range .items[?(.status.phase==\"Running\")]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'"
register: running_pods
no_log: true
- name: Check kubectl output
shell: "{{bin_dir}}/kubectl get pods --all-namespaces -owide"
register: get_pods
no_log: true
- debug: msg="{{get_pods.stdout.split('\n')}}"
- set_fact:
kube_pods_subnet: 10.233.64.0/18