-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return all advertised Gameserver Addresses #3089
Comments
Would it be okay if it was part of the Agones helm configuration? I figure it's not going to change per GameServer/Fleet? It's probably more tied to your infrastructure and Agones installation? I was thinking something like:
As a helm configuration option (the above would be the default as what we have now), and then you can basically choose whatever keys a Howzat? |
Yeah, that's totally fine. Having it configured per fleet isn't my use case, but only mentioned it to be flexible. Just having a toggle to pick how it's going to prioritize who can to address is all I was looking for. |
I really like this idea - we've had different people want different options since day 1 -- so this makes a lot of sense. |
Hi, I have a usecase which could challenge this issue a bit. I would love to have your feedbacks on that. My game servers are managed by a Being able to restrict the external/internal exposure will be a necessity for me to move into production. However, you are talking here about choosing the IP to put in a The safest configuration scenario for me would be to configure Agones with Helm to use the internal network only by default, and manually configure a |
@IamBlueSlime I'm not sure how this ticket is related to your issue, since it doesn't affect access control to the GameServer - purely what information is returned via GameServer resource records in Kubernetes. |
This issue is about the ability to select the node IP we want to store in the I will take the time to elaborate more my issue and will open a dedicated one here. |
Perfect - sounds like a plan 👍🏻 |
For those watching this issue - if we were to instead implement #957, would that meet your usecase? In other words, if the allocator API and the |
It would serve our purposes, yes. Bonus points if we're able to make an informed decision about the addresses in the list easily (meaning it would be a list of objects that had an identifier or label that would let us know which was the internal, external, ipv6 etc without needing to parse the address before determining type). |
https://kubernetes.io/docs/concepts/architecture/nodes/#addresses provides you with a subset of the keys that a Node address usually contains. It can be more, depending on the cloud provider. |
Hmm, that could be a detriment. Right now the |
Just leaving a breadcrumb for the API definition (vs the |
Yeah, I was hoping it'd be a reference to this kind of key as opposed to just a list of strings |
It's a list of But yeah, it means every time you want something other than the default GameServer address, you have to loop through 'em. |
Right. I was thinking it was just a bag of
Someone's got to do it, though. It's either:
|
I don't mind looking through them, or writing a "find the address I want" lookup. I just didn't want to have to check the string against a regex to see if it was ipv4/6, then check the subnet to see if it was internal/external, etc. Having the key available that says "this is the external address value" is what I was wanting. List of structs vs string is perfect. |
What's tough is - the "ExternalIP" - that could be ipv4 or ipv6 - the Node information doesn't tell us that. |
Lol, ok. Bad example. Internal/External/Node is sufficient 😜 |
It's true. In my head, if we were going to support configuration around the priority, we would need a separate enum for the address family. That said, in most languages you can do the equivalent of |
Maybe another interesting question. Can we think of a scenario in which you would want to have access to more than one address type of a GameServer? |
In DNS-land it's a common approach to ask for PS yes, this comment is an excuse to say Happy Eyeballs. |
Just chatting about this in the community meeting - the thing that shifted my perspective on this is that when IPv6 is enabled on GKE, it reuses Address labels (so you will end up with multiple So rather than coming up with a DSL to determine which address label and what type of IP it is, let's return all the addresses from a node and let people do that in code where it's much easier. |
Is your feature request related to a problem? Please describe.
The change suggested in #1921 and addressed in #1928 introduced the following order of preference when selecting an address for advertisement on a gameserver resource:
agones/pkg/gameservers/gameservers.go
Lines 43 to 68 in 02e57ba
However, there are use cases where
NodeInternalIP
might be a more preferable selection for a gameserver's advertised address.Describe the solution you'd like
Instead of a hard coded order for address selection, I would rather this logic be configurable to fit the specific situation. This doesn't have to be something that is handled on a pod-by-pod basis, but could just be something that's configured for all gameservers on a cluster.
Describe alternatives you've considered
It seems overkill, but it might be cool to have this configuration option be part of the GameserverSpec, or PodSpec.
The text was updated successfully, but these errors were encountered: