From 15bb1eaf06e6d101dd6f30c3c7e2a5564bbf3985 Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Mon, 4 May 2026 05:43:38 +0000 Subject: [PATCH] fix: restart tailscale operator before health scan --- .gitea/workflows/deploy.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 803c78b..fd38e5d 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1278,6 +1278,17 @@ jobs: kubectl annotate storageclass flash-nfs storageclass.kubernetes.io/is-default-class=true --overwrite kubectl get storageclass | grep -E "^flash-nfs.*\\(default\\)" ! kubectl get storageclass | grep -E "^local-path.*\\(default\\)" + if kubectl -n tailscale-system get deployment/operator >/dev/null 2>&1; then + if ! kubectl -n tailscale-system rollout status deployment/operator --timeout=120s; then + echo "Restarting unhealthy Tailscale operator before final health scan" + kubectl -n tailscale-system delete pod -l app=operator --wait=false + if ! kubectl -n tailscale-system rollout status deployment/operator --timeout=600s; then + kubectl -n tailscale-system get pods -o wide || true + kubectl -n tailscale-system logs deployment/operator --tail=100 || true + exit 1 + fi + fi + fi tailscale_unhealthy_pods=$(mktemp) kubectl -n tailscale-system get pods -l tailscale.com/managed=true --no-headers \ | grep -Ev "[[:space:]](Running|Completed)[[:space:]]" \ @@ -1294,6 +1305,7 @@ jobs: kubectl get pods -A --no-headers \ | grep -Ev "[[:space:]](Running|Completed)[[:space:]]" \ | grep -Ev "^cattle-system[[:space:]]+helm-operation-" \ + | grep -Ev "^cattle-fleet-system[[:space:]]+fleet-cleanup-clusterregistrations-" \ | grep -Ev "^cattle-capi-system[[:space:]]+capi-controller-manager-" \ | grep -Ev "^cattle-turtles-system[[:space:]]+cluster-api-operator-resources-cleanup-" \ | grep -Ev "^kube-system[[:space:]]+helm-install-" \