agones
agones copied to clipboard
agones-{extensions,allocator}: Make servers context aware
- adds an
httpserver
utility package to handle theRun
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 forReplicas != 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