dgkanatsios / azuregameserversscalingkubernetes

Scaling Dedicated Game Servers on Azure Kubernetes Service
MIT License
39 stars 16 forks source link

How to do DedicatedGameServerCollection Docker image updates? #16

Open dgkanatsios opened 6 years ago

dgkanatsios commented 6 years ago

We should implement a mechanism to update Container images. First step would be to detect it in the DGSCollection controller, than mark images for deletion, so that new DGS that are created pull the updated image.

dgkanatsios commented 6 years ago

Wondering how this should be handled. Let's assume that we have a pool of 10 DedicatedGameServers on a collection. We discover a severe bug. Does it make sense to 'upgrade' somehow these servers in this collection (e.g. by RollingUpdates => MarkForDeletion -> WaitForZeroActivePlayers -> Delete it -> Create another one -> so on and so forth) or does it make sense to create another collection with the updated image and "shrink" the previous one to 0 replicas (so that servers will be deleted when players leave the server)?

dgkanatsios commented 6 years ago

Apart from the manual solution described above, a more orchestrated solution would be to create an entity that would own DedicatedGameServerCollection (DGSCol). Let's call this entity DedicatedGameServerDeployment (DGSDep). When the user creates a DGSDep, this would create a DGSCol. When the user updates a DGSDep image, this would result in

Some things we need to think about

  1. What about the DGS autoscaling? Maybe we should attach it to DGSDep
  2. DGSDep should have a (fixed size) history of image updates, so we can rollback easily