Update master_node_install.sh

This commit is contained in:
RomanNum3ral 2026-03-27 22:39:50 +00:00
parent 1f6c897836
commit c82ae6c8fd
1 changed files with 10 additions and 13 deletions

View File

@ -288,31 +288,28 @@ wait_for_system_pods() {
kubectl_rke2 get nodes -o wide || true kubectl_rke2 get nodes -o wide || true
kubectl_rke2 get pods -A || 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 waited=0
until kubectl_rke2 -n kube-system get pods -l app=rke2-canal -o json 2>/dev/null | jq -e ' until kubectl_rke2 -n kube-system get daemonset rke2-canal >/dev/null 2>&1; do
.items
| length > 0
and all(
.[];
(.status.phase == "Running")
and ((.status.containerStatuses // []) | length > 0)
and all(.status.containerStatuses[]; .ready == true)
)
' >/dev/null; do
sleep 5 sleep 5
waited=$((waited + 5)) waited=$((waited + 5))
if (( waited % 30 == 0 )); then 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 kubectl_rke2 -n kube-system get pods -o wide || true
fi fi
if (( waited >= 900 )); then if (( waited >= 900 )); then
kubectl_rke2 -n kube-system get daemonsets || true
kubectl_rke2 -n kube-system get pods -o wide || 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 fi
done 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 sleep 20
log "Waiting for bundled RKE2 addon deployments" log "Waiting for bundled RKE2 addon deployments"