Update master_node_install.sh
This commit is contained in:
parent
1f6c897836
commit
c82ae6c8fd
|
|
@ -288,31 +288,28 @@ wait_for_system_pods() {
|
|||
kubectl_rke2 get nodes -o wide || true
|
||||
kubectl_rke2 get pods -A || true
|
||||
|
||||
log "Waiting for Canal (CNI) to be fully ready"
|
||||
log "Waiting for Canal (CNI) DaemonSet to exist"
|
||||
|
||||
waited=0
|
||||
until kubectl_rke2 -n kube-system get pods -l app=rke2-canal -o json 2>/dev/null | jq -e '
|
||||
.items
|
||||
| length > 0
|
||||
and all(
|
||||
.[];
|
||||
(.status.phase == "Running")
|
||||
and ((.status.containerStatuses // []) | length > 0)
|
||||
and all(.status.containerStatuses[]; .ready == true)
|
||||
)
|
||||
' >/dev/null; do
|
||||
until kubectl_rke2 -n kube-system get daemonset rke2-canal >/dev/null 2>&1; do
|
||||
sleep 5
|
||||
waited=$((waited + 5))
|
||||
if (( waited % 30 == 0 )); then
|
||||
warn "Canal is not fully ready yet"
|
||||
warn "rke2-canal DaemonSet not present yet"
|
||||
kubectl_rke2 -n kube-system get daemonsets || true
|
||||
kubectl_rke2 -n kube-system get pods -o wide || true
|
||||
fi
|
||||
if (( waited >= 900 )); then
|
||||
kubectl_rke2 -n kube-system get daemonsets || true
|
||||
kubectl_rke2 -n kube-system get pods -o wide || true
|
||||
die "Timed out waiting for Canal"
|
||||
die "Timed out waiting for rke2-canal DaemonSet to appear"
|
||||
fi
|
||||
done
|
||||
|
||||
log "Waiting for Canal (CNI) to be fully rolled out"
|
||||
kubectl_rke2 -n kube-system rollout status daemonset/rke2-canal --timeout=20m
|
||||
|
||||
# Give kube-proxy and service routing a moment to settle.
|
||||
sleep 20
|
||||
|
||||
log "Waiting for bundled RKE2 addon deployments"
|
||||
|
|
|
|||
Loading…
Reference in New Issue