agones icon indicating copy to clipboard operation
agones copied to clipboard

agones-{extensions,allocator}: Make servers context aware

Open zmerlynn opened this issue 8 months ago • 6 comments

  • adds an httpserver utility package to handle the Run function that controller/extensions use. Make that context aware using the same method as https.Run: https://github.com/googleforgames/agones/blob/dfa414e5e4da37798833bbf8c33919acb5f3c2ea/pkg/util/https/server.go#L127-L130
  • also plumbs context-awareness through the allocator run{Mux,REST,GRPC} functions.
  • adds a gRPC health server to the allocator, calls .Shutdown() on it during graceful termination - this seems to push the client off correctly.

Along the way, basically re-wrote the TestAllocatorAfterDeleteReplica test:

  • moved the GetAllocatorClient up because it's fairly disruptive (new certs, etc.), so I wanted the pod stability checks to happen after
  • changed agones-allocator stability checks to just grab the Deployment and wait for Replicas != AvailableReplicas.
  • changed the test to actually disrupt the Pods in the middle of the test (vs before it just nukes the pods then starts the test.

Tested with e2e in a loop.

Towards #3853

zmerlynn avatar May 31 '24 13:05 zmerlynn