fix: harden cluster rebuild determinism
This commit is contained in:
@@ -76,6 +76,18 @@
|
||||
roles:
|
||||
- kube-vip-deploy
|
||||
|
||||
- name: Wait for Kubernetes API VIP readiness
|
||||
hosts: control_plane[0]
|
||||
become: true
|
||||
tasks:
|
||||
- name: Wait for Kubernetes readyz through the VIP
|
||||
command: kubectl --server=https://{{ kube_api_endpoint }}:6443 get --raw=/readyz
|
||||
register: api_readyz
|
||||
until: api_readyz.rc == 0
|
||||
retries: 30
|
||||
delay: 10
|
||||
changed_when: false
|
||||
|
||||
- name: Setup secondary control planes
|
||||
hosts: control_plane[1:]
|
||||
become: true
|
||||
@@ -123,6 +135,31 @@
|
||||
|
||||
- name: Import kube-vip image into containerd
|
||||
command: /usr/local/bin/ctr -n k8s.io images import /tmp/kube-vip-bootstrap.tar
|
||||
register: kube_vip_secondary_import
|
||||
until: kube_vip_secondary_import.rc == 0
|
||||
retries: 3
|
||||
delay: 10
|
||||
changed_when: false
|
||||
|
||||
- name: Wait for all control plane nodes to be Ready
|
||||
hosts: control_plane[0]
|
||||
become: true
|
||||
tasks:
|
||||
- name: Wait for control plane node readiness
|
||||
command: kubectl wait --for=condition=Ready node/{{ item }} --timeout=30s
|
||||
register: control_plane_ready
|
||||
until: control_plane_ready.rc == 0
|
||||
retries: 20
|
||||
delay: 15
|
||||
changed_when: false
|
||||
loop: "{{ groups['control_plane'] }}"
|
||||
|
||||
- name: Wait for Kubernetes readyz before worker joins
|
||||
command: kubectl --server=https://{{ kube_api_endpoint }}:6443 get --raw=/readyz
|
||||
register: api_readyz_before_workers
|
||||
until: api_readyz_before_workers.rc == 0
|
||||
retries: 30
|
||||
delay: 10
|
||||
changed_when: false
|
||||
|
||||
- name: Setup workers
|
||||
|
||||
Reference in New Issue
Block a user