-
Notifications
You must be signed in to change notification settings - Fork 828
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
More Local Dev Server Annotations #3284
Comments
I'll give another alternative to this annotation - that the local sidecar is the one that's responsible for recreating a new GameServer with the requisite annotations. That would require restarting the local sidecar though to recreate the Then there is less manual management on the cluster of the |
Both seem useful. I don't see it as an "alternative" in the impl sense, but maybe in the flow sense. To say another way. I think that both would be useful to have, some devs might use either.
Though, I think there are a few open questions that I see with the latter.
I think the notion of having the SDK Server modify the As such, I think that documenting It can definitely be said that some of the unflushed out issues mentioned above (like cleaning up dynamic fields, e.g. for HDGSs) also apply when just having a Despite all the critique, none of this is to say that supporting Obviously, this is just my sense of things. Feel free to disagree and/or discuss more. |
'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions ' |
This issue is marked as obsolete due to inactivity for last 60 days. To avoid issue getting closed in next 30 days, please add a comment or add 'awaiting-maintainer' label. Thank you for your contributions |
Is your feature request related to a problem? Please describe.
Not really a "problem", just some quality of life improvements.
This is a follow up from some discussion on #3252, specifically mentioned in #3252 (comment).
This is in the interest of bridging the gap between locally debuggable
GameServer
s and prod-like functionality. There are a fewannotations
that would be useful for adjusting state progression on dev game servers.Describe the solution you'd like
Add
agones.dev/auto-ready
annotation supportCurrently, dev game servers will automatically always progress from the
Creating
state to theReady
state. While this functionality can be quite useful in many developer flows, it is unlike the flow taken in prod-like environments (shown in https://agones.dev/site/docs/reference/gameserver/#gameserver-state-diagram) whereGameServer
s are instead set into theScheduled
state. Progression from this state is done by the game server binary callingSDK.Ready()
which puts theGameServer
into theRequestReady
state, which is then further progressed by the controller into theReady
state.The proposal for this is that the controller progresses dev game servers from
Creating
state intoScheduled
instead of directly intoReady
. The current functionality would be optionally preserved by adding the annotationagones.dev/auto-ready: true
to theGameServer
resource. The https://agones.dev/site/docs/guides/local-game-server/ documentation page could be updated to include this annotation.This automatic state progression is handled here:
agones/pkg/gameservers/controller.go
Line 526 in 8f575ed
Add
agones.dev/recycle-gs
annotation supportCurrently, when a dev game server gets
SDK.Shutdown()
called, theGameServer
naturally goes into theShutdown
state; but the controller will always delete theGameServer
resource just as it does for anyGameServer
resource in theShutdown
state.This proposal is to support adding an annotation
agones.dev/recycle-gs: true
that, when set, will reset theGameServer
resource back into theScheduled
state (orReady
with above mentionedagones.dev/auto-ready: true
) instead of deleting theGameServer
.Admittedly, this is not exactly like what happens on prod-like environments -- instead its mimicking functionality that would be handled by a fleet (keeping up
GameServer
counts after they terminate).This automatic state progression is handled here:
agones/pkg/gameservers/controller.go
Line 898 in 8f575ed
Describe alternatives you've considered
agones.dev/auto-ready
annotation alternativesThe existing functionality performs the auto-ready logic. The current alternative would be to manually set the state via a REST call. However, doing so is slightly tedious and not representative of how prod-like environments would function. When performing
GameServer
allocation on a dev server, it would be nice to know that allocation can't happen until the binary itself has calledSDK.Ready()
.Another alternative considered as to keep the current default "auto-ready" behavior and the annotation would be to disable it. However, adding a negative logic
agones.dev/dont-auto-ready
seems a bit awkward (feel free to disagree).agones.dev/recycle-gs
annotation alternativesThe current functionality requires re-running
kubectl create -f ./my_dev_server.yml
, which is not the worst but it is slightly tedious and just another step when trying to quickly iterate and dev (especially when prototyping). The suggestedagones.dev/recycle-gs
annotation is just a small QoL bit of automation.Additional context
Agones is cool. 😎 Thanks!
The text was updated successfully, but these errors were encountered: