diff --git a/scripts/verify_kind_agones.sh b/scripts/verify_kind_agones.sh index ce12bff2..d05015a6 100755 --- a/scripts/verify_kind_agones.sh +++ b/scripts/verify_kind_agones.sh @@ -185,7 +185,13 @@ kubectl -n cosmic-clash create secret generic cosmic-clash-game-server \ kubectl apply -f deploy/k8s/base/service-accounts.yaml kubectl apply -f "$work_dir/fleet.yaml" -kubectl wait --for=jsonpath='{.status.ready}'=2 \ +# The field is readyReplicas, not ready: an Agones Fleet's status carries +# replicas/readyReplicas/reservedReplicas/allocatedReplicas, and the READY +# column printed by kubectl is readyReplicas. Waiting on `.status.ready` could +# never match however healthy the Fleet was, which masked itself as "the Fleet +# never became ready" and sent three separate investigations after the game +# server instead of the assertion. +kubectl wait --for=jsonpath='{.status.readyReplicas}'=2 \ fleet/cosmic-clash-game -n cosmic-clash --timeout=5m cat > "$work_dir/allocation.yaml" <<'EOF' diff --git a/server/security/test_fleet_manifests.py b/server/security/test_fleet_manifests.py index acce6c65..006bff45 100644 --- a/server/security/test_fleet_manifests.py +++ b/server/security/test_fleet_manifests.py @@ -111,6 +111,12 @@ class FleetManifestTest(unittest.TestCase): "agones.ping.udp.serviceType=ClusterIP", ): self.assertIn(service, runner) + # The Fleet's readiness field is readyReplicas; waiting on `.status.ready` + # silently never matches and reads as "the Fleet never became ready". + self.assertIn("jsonpath='{.status.readyReplicas}'=2", runner) + self.assertNotIn("jsonpath='{.status.ready}'", runner) + # Build by default, or a local rerun verifies whatever was tagged last. + self.assertIn("KIND_REUSE_GAME_SERVER_IMAGE", runner) self.assertIn("cosmic-clash.io/capacity-type=on-demand", runner) self.assertIn("topology.kubernetes.io/zone=kind-smoke", runner) self.assertIn("--control-plane-url=", runner)