Octops / gameserver-ingress-controller

Automatic Ingress configuration for Game Servers managed by Agones
https://octops.io
Apache License 2.0
68 stars 9 forks source link

Support multiple hosts #43

Closed kimxogus closed 1 year ago

kimxogus commented 2 years ago

I need 2 hosts, one for internal ingress and the other for external ingress(end users) usage, but it seems that only 1 host is supported in octops ingress controller.

Can you add this feature? Splitting fqdn annotation by , character could be simple.

danieloliveira079 commented 2 years ago

Tks @kimxogus for suggesting this feature. I will evaluate how this affects the current implementation.

danieloliveira079 commented 2 years ago

Alternatively, if you want to access the game server within the network you can use the Service that the gameserver-controller creates. A gameserver named octops-domain-tqmvm-rcl5p can be accessed using the FQDN octops-domain-tqmvm-rcl5p.default.svc.cluster.local. Assuming your game servers are running under the default namespace.

More information about that on https://kubernetes.io/docs/concepts/services-networking/dns-pod-service

The address octops-domain-tqmvm-rcl5p.default.svc.cluster.local can be accessed from any pod running within the cluster. Including pods running in a different namespace.

danieloliveira079 commented 1 year ago

Closing this issue since the internal name can be used for Pod to Pod communication.

jongwow commented 1 year ago

This feature could be useful when supporting multiple hosts for external ingress(end users). can you reconsider it?

danieloliveira079 commented 1 year ago

Yes I believe I can. One question I would have about how TLS would be configured for these cases. I am reopening the issue and will look more into that this weekend. Tks for the feedback.

danieloliveira079 commented 1 year ago

@jongwow Please test the support to multiple host using the image octops/gameserver-ingress-controller:rc-0.2.4.

Also check this PR to understand how the Fleet or GameServer annotations should be. https://github.com/Octops/gameserver-ingress-controller/pull/45

Let me know if that works or if you got any bug or feedback. I will park the development until I here something back from you.

jongwow commented 1 year ago

Thank you for your work! Actually I don't know much about TLS configuration because my colleague handles it and can't access due to security issues. All I know is that when using external proxy, it needs two hosts.

I really appreciate your work and I will let you know after check it :)

danieloliveira079 commented 1 year ago

PR merged and feature available.