Skip to content

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 requested a review from javier-op July 10, 2022 15:19
@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