We would like to leverage company's API gateway to provide https termination, authentication, rate limit, ip filter and more in front of game server which uses websocket (probably quic later) for communication. Our K8s cluster is private GKE, and has not public ip for nodes, and all traffic will route from API gateway.
Currently, ports expose game server using node ip and ports. The K8s cluster works well but as it does not use node's port for traffic, ports configuration is a little annoying. It would be better if game server can config without ports (no hostport too).
This has some overlap with what is discussed in https://github.com/googleforgames/agones/issues/668 for bare metal. The deployment environment is different, but the feature ask sounds similar.
@markmandel So hey, I've finally had a chance to look at this and the pr again and it seems that Agones does require at least 1 port to be specified in the game server template.
```
The Fleet "event-server" is invalid: spec.template.spec.ports: Invalid value: "": spec.template.spec.ports in body should have at least 1 items
````
The current workaround that we are using is exposing a port that isn't being listened on in the container however I really don't want to keep that going long term. My take is that not allowing this is kind of a bug and the fix needs to be that we can not specify ports or that we allow Internal ports to become a thing. If we go the Internal port route I am happy to reopen the pr (I just need to refork the repo & do the commits :P)
I feel like we could likely just change the validation so that it allows 0, and it would probably work just fine?
(Seems like the easiest place to start!)
Yeh that's likely the way to go, however I do think we should have a test case for this just to make sure it doesn't lock up the port assigner like it was when I was testing with Internal ports (which is why https://github.com/googleforgames/agones/pull/1576/files#diff-310ad1666561c0a99ea0effb347aea2bR124 existed)
Ah yep! Testing always good 馃憤
Any news on this issue? We want to use Agones but would like to handle the routing to the gameservers by ourselves.
@ItsKev sounds like you are volunteering to work on this feature 馃槉
@markmandel Sure, I'll try my best.
Most helpful comment
Yeh that's likely the way to go, however I do think we should have a test case for this just to make sure it doesn't lock up the port assigner like it was when I was testing with Internal ports (which is why https://github.com/googleforgames/agones/pull/1576/files#diff-310ad1666561c0a99ea0effb347aea2bR124 existed)