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

Update GameServer state diagram with Reserved #933

Merged
merged 2 commits into from Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions site/content/en/docs/Reference/gameserver.md
Expand Up @@ -38,7 +38,7 @@ spec:
imagePullPolicy: Always
```
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
{{% feature publishVersion="0.12.0" %}}
```yaml
apiVersion: "agones.dev/v1"
kind: GameServer
Expand Down Expand Up @@ -71,7 +71,7 @@ spec:
{{% feature expiryVersion="0.12.0" %}}
Since Agones defines a new [Custom Resources Definition (CRD)](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) we can define a new resource using the kind `GameServer` with the custom group `stable.agones.dev` and API version `v1alpha1`.
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
{{% feature publishVersion="0.12.0" %}}
Since Agones defines a new [Custom Resources Definition (CRD)](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) we can define a new resource using the kind `GameServer` with the custom group `agones.dev` and API version `v1`.
{{% /feature %}}

Expand All @@ -95,7 +95,7 @@ The `spec` field is the actual GameServer specification and it is composed as fo
{{% feature expiryVersion="0.12.0" %}}
- `template` the [pod spec template](https://v1-11.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#podtemplatespec-v1-core) to run your GameServer containers, [see](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates) for more information.
{{% /feature %}}
{{% feature publishversion="0.12.0" %}}
{{% feature publishVersion="0.12.0" %}}
- `template` the [pod spec template](https://v1-12.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#podtemplatespec-v1-core) to run your GameServer containers, [see](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates) for more information.
{{% /feature %}}

Expand All @@ -109,4 +109,5 @@ Game Servers are created through Kubernetes API (either directly or through a [F
- Allocation controller, which marks game servers as `Allocated` to handle a game session
- SDK, which manages health checking and shutdown of a game server session

![GameServer State Diagram](../../../diagrams/gameserver-states.dot.png)
{{% feature expiryVersion="0.12.0" %}}![GameServer State Diagram](../../../diagrams/gameserver-states.dot-0.11.png){{% /feature %}}
{{% feature publishVersion="0.12.0" %}}![GameServer State Diagram](../../../diagrams/gameserver-states.dot.png){{% /feature %}}
11 changes: 10 additions & 1 deletion site/static/diagrams/gameserver-states.dot
Expand Up @@ -11,6 +11,7 @@ digraph {
Scheduled
RequestReady
Ready
Reserved
Allocated
Shutdown
Unhealthy
Expand All @@ -23,21 +24,29 @@ digraph {
PortAllocation -> Creating [ label="allocated unused port", color="blue" ]
Creating -> Starting [ label="created pod", color="blue" ]
Starting -> Scheduled [ label="we have a pod, fetch its address", color="blue" ]
Scheduled -> Reserved [ label="SDK.reserved(seconds)", color="purple" ]
Scheduled -> RequestReady [ label="SDK.ready()", color="purple" ]
RequestReady -> Ready [ label="ready to be allocated", color="blue" ]
Reserved -> Ready [label="if seconds > 0 \land failed to call \lSDK.allocate() " color="purple"]

Ready -> Allocated [ label="allocated for use", color="orange" ]
Ready -> Allocated [ label="SDK.allocate() ", color="purple" ]
Reserved -> Allocated [color="purple"]
roberthbailey marked this conversation as resolved.
Show resolved Hide resolved

Creating -> Error [ label="failed to create pod", color="blue" ]

Scheduled -> Shutdown [ label="SDK.shutdown()", color="purple" ]
RequestReady -> Shutdown [ color="purple" ]
Ready -> Shutdown [ color="purple" ]
Allocated -> Shutdown [ color="purple" ]
Reserved -> Shutdown [ color="purple" ]


Scheduled -> Unhealthy [ label="failed to call SDK.healthy()\nin a timely manner" ]
Scheduled -> Unhealthy [ label="failed to call SDK.healthy()\nin a timely manner" color="purple" ]
RequestReady -> Unhealthy [ color="purple" ]
roberthbailey marked this conversation as resolved.
Show resolved Hide resolved
Ready -> Unhealthy [ color="purple" ]
Allocated -> Unhealthy [ color="purple" ]
Reserved -> Unhealthy [ color="purple" ]

Unhealthy -> Deleted [ label="delete unhealthy game server", color="blue" ]
Shutdown -> Deleted [ label="delete finished game server", color="blue" ]
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/static/diagrams/gameserver-states.dot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.