From 08bfd52a60627a3a5c60ec1d2ae51e69e5c25c7a Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Tue, 5 May 2026 13:44:07 +0300 Subject: [PATCH] fix(ci): apply cr in nested cluster Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 29 +++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index 73ef29c091..5f50809617 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -971,10 +971,35 @@ jobs: - name: Configure Virtualization run: | + kubectl_apply_with_retry() { + local count=6 + local delay=10 + local manifest + manifest="$(mktemp)" + cat > "$manifest" + + for i in $(seq 1 "$count"); do + echo "[INFO] kubectl apply attempt ${i}/${count}" + if kubectl apply -f "$manifest"; then + rm -f "$manifest" + return 0 + fi + + if [ "$i" -lt "$count" ]; then + echo "[WARN] kubectl apply failed, retrying in ${delay}s" + sleep "$delay" + fi + done + + echo "[ERROR] kubectl apply failed after ${count} attempts" + rm -f "$manifest" + return 1 + } + REGISTRY=$(base64 -d <<< "${{secrets.DEV_REGISTRY_DOCKER_CFG}}" | jq '.auths | to_entries | .[] | .key' -r) echo "[INFO] Apply ModuleSource dev config" - kubectl apply -f -<