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

Register GameServers with local IP addresses #469

Closed
markmandel opened this issue Jan 2, 2019 · 9 comments
Closed

Register GameServers with local IP addresses #469

markmandel opened this issue Jan 2, 2019 · 9 comments
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/design Proposal discussing new features / fixes and how they should be implemented kind/feature New features for Agones
Milestone

Comments

@markmandel
Copy link
Member

Problem

For development/QA purposes, it is useful to be able to register a gameserver with Agones, but overwrite it with a specific local IP address, so that it can run through the same Agones system, but QA testers can connect to it, without having to do a full build + deploy pipeline.

Design

We assume all port configuration should be static.
If the GameServer has an annotation of: stable.agones.dev/dev-address: "192.168.0.1" then we intercept this in the controller:

  1. Don't create a Pod
  2. Use this as the Status.State address.
  3. Static port configurations are moved directly into Status.Ports
  4. Automatically mark this GameServer as Ready.

Example:

apiVersion: "stable.agones.dev/v1alpha1"
kind: GameServer
metadata:
  name: "xonotic"
  annotations:
    stable.agones.dev/dev-address: "192.168.0.1"
spec:
  ports:
    - name: default
      portPolicy: static
      containerPort: 26000
      hostPort: 26000
  template:
    spec:
      containers:
        - name: xonotic
          image: gcr.io/agones-images/xonotic-example:0.4

Questions

  • Do we like the name of the annotation?
@markmandel markmandel added kind/feature New features for Agones kind/design Proposal discussing new features / fixes and how they should be implemented labels Jan 2, 2019
@markmandel
Copy link
Member Author

/cc @reductor - we talked about this a while back, can you see if this design captures what we discussed?

@reductor
Copy link
Contributor

reductor commented Jan 2, 2019

Looks good, would simplify some of our alternative approaches to the problem.

@markmandel markmandel added help wanted We would love help on these issues. Please come help us! good first issue These are great first issues. If you are looking for a place to start, start here! labels Jan 4, 2019
@markmandel markmandel added this to the 0.8.0 milestone Jan 9, 2019
@jeremyje
Copy link
Contributor

I'm looking into this.

@jeremyje
Copy link
Contributor

I'm still working through the bug, I have a test and the logic implemented here, https://github.com/jeremyje/agones/tree/local-ip.

I have a question though,
When you say don't create a pod. Does that mean the QA server isn't managed by Agones/Kubernetes and that the goal is to mainly register the existence of the QA server? Bypass all those liveness checks and all that.

@markmandel
Copy link
Member Author

Exactly. The active game server likely sits on someone's machine at their desk, and this gives them a way to basically "fake" a Ready gameserver on an Agones cluster, that someone can then connect to within their corp-network.

Then all your other tooling (matchmaking, etc) can still work as per normal - you can even allocate this GameServer - but it makes life easier for development.

@jeremyje
Copy link
Contributor

Wouldn't you want this server to be marked as Allocated then?

@reductor
Copy link
Contributor

Marking it as already allocated would be game specific

@markmandel
Copy link
Member Author

👍 on what @reductor said - I think in most cases you would want it to be ready, so you can flow through from your matchmaker to your game server just like you would normally.

At the very least, we should start with Ready and see if people have a desire to have an option to move to Allocated as well - and we can do that as a separate PR.

WDYT?

@markmandel
Copy link
Member Author

Implemented in #558

@markmandel markmandel modified the milestones: 0.9.0, 0.8.0 Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/design Proposal discussing new features / fixes and how they should be implemented kind/feature New features for Agones
Projects
None yet
Development

No branches or pull requests

3 participants