-
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
how to allocate a Local Game Server? #2536
Comments
Which doc are you referring to? Whenever I need a refresher for how to allocate, I look at https://agones.dev/site/docs/getting-started/create-fleet/#4-allocate-a-game-server-from-the-fleet For easier discovery, I wonder if moving that to a separate page under the getting started guides would make sense. |
@roberthbailey Hi, I mean this doc https://agones.dev/site/docs/guides/local-game-server/ How can I allocate a GS which is registered as a local-game-server? |
That page says "The game server is not managed by Agones. Features like autoscaling, replication, etc are not available." I wonder if allocation is one of the features that doesn't work. Maybe @markmandel knows offhand? |
What's the meaning of registering a local server to agones If it can't be allocated..? |
You can verify the interaction between the game server and the SDK / sidecar. For example, you can verify that you are sending health pings correctly, you can watch the game server to see when metadata gets applied to it, you can set labels or annotations on the game server and see metadata propagate back to the Kubernetes resource, you can verify that you are calling It seems like it should be possible to allocate a local game server though - I just haven't tried testing it myself. |
Sorry, I think there is confusion. https://agones.dev/site/docs/guides/local-game-server/ refers to registering a local address for QA purposes with an existing Agones cluster. (This is different from the test local server found here), which I think is what you were referring to @roberthbailey. If you want to allocate that The point of it is that it looks and acts like just about any other GameServer withing the cluster, but the address points to a local instance, to make QA a bit easier to handle, so there is inherently nothing special about how you would Allocate it vs any other GameServer. |
So it sounds like it should be allocatable like any other game server and we just need to add some instructions on how to do it. |
Not sure how we can tell you how to do it - other than point you at existing documentation 🤔 . We don't know what labels you are putting on your We could make a note that "you can then allocate as you would do normally, through label selectors", and point to the GameServerAllocation reference? (maybe provide an example?) Would that make things clearer @goace ? |
@markmandel thanks for your reply, it make sense. So I can add a native k8s label to a gameserver, then I can allocate it via "matchLabels" with my custom lable, is that right? I think you should put that in the docs to make this clear to everyone.. |
I encountered a new problem, I think it's a bug. I allocated a local game server with my custom label successfully, bug the gameserver's state is still READY. |
for more information, this is my config files: # gameserver depolyment
apiVersion: "agones.dev/v1"
kind: GameServer
metadata:
name: local-gs
annotations:
agones.dev/dev-address: "192.168.1.1"
labels:
gstype: local
spec:
ports:
- name: default
portPolicy: Static
hostPort: 17654
containerPort: 17654
# The following is ignored but required due to validation.
template:
spec:
containers:
- name: simple-game-server
image: gcr.io/agones-images/simple-game-server:0.11
# allocation
apiVersion: "allocation.agones.dev/v1"
kind: GameServerAllocation
spec:
selectors:
- matchLabels:
gstype: local
scheduling: Packed |
Oooh! Good find! Just replicated this in an e2e test locally. I'll get a fix into the next release. |
Found the bug! PR incoming. That's been there a long while. The good news is, since you are managing individual local development |
There was a bug in the implementation of the [local development GameServer](https://agones.dev/site/docs/guides/local-game-server/) that would always move a `GameServer` to `Ready` any time the state was not currently `Ready`. This meant if you tried to Allocate the `GameServer`, the controller would immediately move it back to being `Ready`. This fix locks down that the only path that the controller should affect is moving from `Creating` state to `Ready`. This allows the end user to manually manage state on the `GameServer` as they desire. Closes googleforgames#2536
There was a bug in the implementation of the [local development GameServer](https://agones.dev/site/docs/guides/local-game-server/) that would always move a `GameServer` to `Ready` any time the state was not currently `Ready`. This meant if you tried to Allocate the `GameServer`, the controller would immediately move it back to being `Ready`. This fix locks down that the only path that the controller should affect is moving from `Creating` state to `Ready`. This allows the end user to manually manage state on the `GameServer` as they desire. Closes googleforgames#2536
* Don't move Dev GameServer back to Ready always There was a bug in the implementation of the [local development GameServer](https://agones.dev/site/docs/guides/local-game-server/) that would always move a `GameServer` to `Ready` any time the state was not currently `Ready`. This meant if you tried to Allocate the `GameServer`, the controller would immediately move it back to being `Ready`. This fix locks down that the only path that the controller should affect is moving from `Creating` state to `Ready`. This allows the end user to manually manage state on the `GameServer` as they desire. Closes #2536 * Review updates.
* Don't move Dev GameServer back to Ready always There was a bug in the implementation of the [local development GameServer](https://agones.dev/site/docs/guides/local-game-server/) that would always move a `GameServer` to `Ready` any time the state was not currently `Ready`. This meant if you tried to Allocate the `GameServer`, the controller would immediately move it back to being `Ready`. This fix locks down that the only path that the controller should affect is moving from `Creating` state to `Ready`. This allows the end user to manually manage state on the `GameServer` as they desire. Closes googleforgames#2536 * Review updates.
the doc only shows how to register a local server to agones, but how can I allocate it ?
The text was updated successfully, but these errors were encountered: