feat(multiplayer): protect allocator availability

This commit is contained in:
Josh Creek
2026-09-01 18:51:18 +01:00
parent 398d6ade61
commit 34cc994598
4 changed files with 21 additions and 1 deletions
@@ -57,6 +57,15 @@ class KubernetesPolicyTest(unittest.TestCase):
self.assertNotIn("port: 8080", allocator)
self.assertNotIn("ipBlock:", allocator)
def test_allocator_pdb_preserves_one_replica_during_voluntary_disruption(self):
pdb = self.read("allocator-pdb.yaml")
for required in (
"apiVersion: policy/v1", "kind: PodDisruptionBudget",
"name: allocator", "namespace: cosmic-clash",
"minAvailable: 1", "app.kubernetes.io/name: allocator",
):
self.assertIn(required, pdb)
def test_rbac_is_scoped_to_allocator_create(self):
rbac = self.read("rbac.yaml")
self.assertIn("namespace: agones-system", rbac)