Skip to content

Commit 916154d

Browse files
committed
Fix: ensure we cleanup the finalizer if any stuck before installing (1.33 issue)
1 parent fd0d7d1 commit 916154d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

build/e2e-image/e2e.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,22 @@ FEATURES=$1
1818
CLOUD_PRODUCT=$2
1919
REGISTRY=$3
2020

21+
K8S_MINOR=$(kubectl version -o json | jq -r '.serverVersion.minor' | sed 's/+//')
22+
2123
echo $FEATURES
2224
echo $REGISTRY
25+
echo $K8S_MINOR
2326
set -e
27+
28+
# Ensure we cleanup the finalizers from k8s 1.33 until they patch it
29+
if [ "$K8S_MINOR" = "33" ]; then
30+
echo "GKE 1.33 detected: cleaning up stuck service finalizers"
31+
32+
kubectl get svc -n agones-system -o json \
33+
| jq -r '.items[] | select(.metadata.finalizers != null) | .metadata.name' \
34+
| xargs -r -I {} kubectl patch svc -n agones-system -p '{"metadata":{"finalizers":null}}' --type=merge
35+
fi
36+
2437
echo "installing current release"
2538
DOCKER_RUN= make install FEATURE_GATES='"'$FEATURES'"' REGISTRY='"'$REGISTRY'"'
2639
echo "starting e2e test"

0 commit comments

Comments
 (0)