mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-11-23 19:06:33 +01:00
Added retry to networking setup for when the kubelet isn't quite ready yet
This commit is contained in:
parent
4a4c88b6b8
commit
270d38ea72
@ -50,18 +50,24 @@
|
|||||||
register: flannel_result
|
register: flannel_result
|
||||||
changed_when: "'created' in flannel_result.stdout"
|
changed_when: "'created' in flannel_result.stdout"
|
||||||
when: kubernetes_pod_network.cni == 'flannel'
|
when: kubernetes_pod_network.cni == 'flannel'
|
||||||
|
retries: 3
|
||||||
|
delay: 5
|
||||||
|
|
||||||
- name: Configure Calico networking.
|
- name: Configure Calico networking.
|
||||||
command: "kubectl apply -f {{ kubernetes_calico_manifest_file }}"
|
command: "kubectl apply -f {{ kubernetes_calico_manifest_file }}"
|
||||||
register: calico_result
|
register: calico_result
|
||||||
changed_when: "'created' in calico_result.stdout"
|
changed_when: "'created' in calico_result.stdout"
|
||||||
when: kubernetes_pod_network.cni == 'calico'
|
when: kubernetes_pod_network.cni == 'calico'
|
||||||
|
retries: 3
|
||||||
|
delay: 5
|
||||||
|
|
||||||
- name: Get Kubernetes version for Weave installation.
|
- name: Get Kubernetes version for Weave installation.
|
||||||
shell: kubectl version | base64 | tr -d '\n'
|
shell: kubectl version | base64 | tr -d '\n'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: kubectl_version
|
register: kubectl_version
|
||||||
when: kubernetes_pod_network.cni == 'weave'
|
when: kubernetes_pod_network.cni == 'weave'
|
||||||
|
retries: 3
|
||||||
|
delay: 5
|
||||||
|
|
||||||
- name: Configure Weave networking.
|
- name: Configure Weave networking.
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user