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

adding datetime for state transitions #298

Merged
merged 3 commits into from
Jul 11, 2022
Merged

adding datetime for state transitions #298

merged 3 commits into from
Jul 11, 2022

Conversation

dgkanatsios
Copy link
Collaborator

@dgkanatsios dgkanatsios commented Jul 10, 2022

Fixes #265

This PR adds extra fields on GameServer.Status that contain the date/time of when the GameServer transitioned to a specific state.

Backstory:

I've spent some time on this trying to add a slice of state transition objects, similar to the PodConditions one. However, it's been really tricky to patch it, since strategic merge patch doesn't work for CRDs (kubernetes/kubernetes#58414). This would make it hard to patch the status object from inside NodeAgent since we don't keep track of the entire GameServer object. Thus, we opted for a simpler solution which is to inject 3 extra fields on the GameServer.Status object.

@dgkanatsios dgkanatsios changed the title adding state transitions adding datetime for state transitions Jul 10, 2022
@dgkanatsios dgkanatsios force-pushed the states branch 7 times, most recently from 3cacb15 to b82bc93 Compare July 10, 2022 15:01
@dgkanatsios dgkanatsios marked this pull request as ready for review July 10, 2022 15:19
@dgkanatsios dgkanatsios force-pushed the states branch 2 times, most recently from dd68c63 to 4a2c5b4 Compare July 10, 2022 15:31
@dgkanatsios dgkanatsios merged commit 39c3ce5 into main Jul 11, 2022
@dgkanatsios dgkanatsios deleted the states branch July 11, 2022 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keeping track of state changes on each GameServer
2 participants