From 8fcc61cae924a81cea0894bb00ce32f8e1dc2b6e Mon Sep 17 00:00:00 2001 From: jenkins Date: Tue, 9 Jun 2026 01:57:59 -0300 Subject: [PATCH] longhorn: validate oceanus csi registration --- .../core/longhorn-csi-toleration-ensure-job.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/infrastructure/longhorn/core/longhorn-csi-toleration-ensure-job.yaml b/infrastructure/longhorn/core/longhorn-csi-toleration-ensure-job.yaml index 52089912..44f9f875 100644 --- a/infrastructure/longhorn/core/longhorn-csi-toleration-ensure-job.yaml +++ b/infrastructure/longhorn/core/longhorn-csi-toleration-ensure-job.yaml @@ -2,7 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: longhorn-csi-toleration-ensure-2 + name: longhorn-csi-toleration-ensure-3 namespace: longhorn-system spec: backoffLimit: 0 @@ -64,4 +64,13 @@ spec: kubectl -n "${ns}" patch daemonset "${ds}" --type=merge -p "${patch}" fi - kubectl -n "${ns}" rollout status daemonset/"${ds}" --timeout=180s + for attempt in $(seq 1 90); do + if kubectl get csinode titan-23 -o json | jq -e '.spec.drivers[]? | select(.name == "driver.longhorn.io")' >/dev/null; then + echo "driver.longhorn.io registered on titan-23" + exit 0 + fi + sleep 2 + done + + echo "driver.longhorn.io did not register on titan-23 before timeout" >&2 + exit 1