Skip to content
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

Add support for --address-type option to Agones agent #933

Closed
XAMPPRocky opened this issue Apr 24, 2024 · 4 comments · Fixed by #934
Closed

Add support for --address-type option to Agones agent #933

XAMPPRocky opened this issue Apr 24, 2024 · 4 comments · Fixed by #934
Labels
kind/feature New feature or request

Comments

@XAMPPRocky
Copy link
Collaborator

To allow for more versatile address selection in the quilkin agent, we should add support for to allow for the users to specify which of the addresses quicken should use as the address for the gameserver.

Steps

  • Update the GameServer CRD to add support for status.addresses
  • Add --address-type option to agones provider for agent, the option should accept a string as we can't assume that the types in address will be consistent.
  • Add logic to the watch stream to select the address based on --address-type , this should be a case insensitive comparison. When there is multiple instances, we should choose the first one.
@XAMPPRocky XAMPPRocky added the kind/feature New feature or request label Apr 24, 2024
@markmandel
Copy link
Contributor

Is --address-type the string key? (e.g. PodIP), or is it a ip version enum?

In theory there could be multiple PodIP keys in the status.addresses, one ipv4 and one ipv6 -- how do we want to disambiguate between address types as well?

@XAMPPRocky
Copy link
Collaborator Author

I guess I was thinking string, so I think we should probably add a second one for preferring multiple ones with different ip versions

@Jake-Shadle
Copy link
Collaborator

Jake-Shadle commented Apr 25, 2024

So initial dumb questions:

  1. Does status.addresses replace status.address? Or are they complementary?
  2. addresses is a map of <string> (what are some representative examples? is it truly open ended with no constraints?) -> <string> (is this the same as the current value of status.address?)?
  3. Presumably GameServer::endpoint() takes in the address type now?

@XAMPPRocky
Copy link
Collaborator Author

XAMPPRocky commented Apr 25, 2024

So initial dumb questions:

No such thing 🙂

Yes, when this option is specified, it looks through status.addresses, when no option is specified it uses status.address.

Status.addresses is an array of nodeaddresses, you can see the schema here, address-type would map to the type property, and we would pick that type and use the address property from that entry.

https://v1-26.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#nodeaddress-v1-core

Yes, the best way to do this is to change the endpoint function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants