Wait for control pods to be ready before moving to initinfra

Change-Id: I091fe3f712c4bc29d9e0c5f03e234c75523dfa90
This commit is contained in:
sai battina 2020-05-02 19:15:47 +00:00
parent 71b06db819
commit f844596a05

View File

@ -27,3 +27,26 @@
- name: debug kubectl version
debug:
var: airship_kubecofig_version.stdout
- name: Wait for all control pods to be created
command: >-
kubectl get po -n kube-system --selector tier=control-plane \
--kubeconfig {{ airshipctl_config_dir_default | default(ansible_env.HOME) }}/.airship/kubeconfig \
--output=jsonpath='{.items[*].metadata.name}'
register: control_pods_created
until: item in control_pods_created.stdout
retries: 10
delay: 30
with_items:
- etcd
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- name: Wait for control pods become ready
command: >-
kubectl wait -n kube-system --for=condition=Ready pods --selector tier=control-plane --timeout=600s \
--kubeconfig {{ airshipctl_config_dir_default | default(ansible_env.HOME) }}/.airship/kubeconfig \
register: control_pods_ready
- debug: var=control_pods_ready.stdout_lines