Skip to content

Commit 744dcbe

Browse files
markmandelRobert Bailey
authored andcommitted
Update GameServer state diagram with Reserved (agones-dev#933)
Update dot and generated PNG with the Reserved state, and resultant flow from there. Tried to keep it as simple as possible, while still representing potential state changes. Should be final work on agones-dev#660 except for missing SDK functions.
1 parent 844ebac commit 744dcbe

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

‎site/content/en/docs/Reference/gameserver.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
imagePullPolicy: Always
3939
```
4040
{{% /feature %}}
41-
{{% feature publishversion="0.12.0" %}}
41+
{{% feature publishVersion="0.12.0" %}}
4242
```yaml
4343
apiVersion: "agones.dev/v1"
4444
kind: GameServer
@@ -71,7 +71,7 @@ spec:
7171
{{% feature expiryVersion="0.12.0" %}}
7272
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`.
7373
{{% /feature %}}
74-
{{% feature publishversion="0.12.0" %}}
74+
{{% feature publishVersion="0.12.0" %}}
7575
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`.
7676
{{% /feature %}}
7777

@@ -95,7 +95,7 @@ The `spec` field is the actual GameServer specification and it is composed as fo
9595
{{% feature expiryVersion="0.12.0" %}}
9696
- `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.
9797
{{% /feature %}}
98-
{{% feature publishversion="0.12.0" %}}
98+
{{% feature publishVersion="0.12.0" %}}
9999
- `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.
100100
{{% /feature %}}
101101

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

112-
![GameServer State Diagram](../../../diagrams/gameserver-states.dot.png)
112+
{{% feature expiryVersion="0.12.0" %}}![GameServer State Diagram](../../../diagrams/gameserver-states.dot-0.11.png){{% /feature %}}
113+
{{% feature publishVersion="0.12.0" %}}![GameServer State Diagram](../../../diagrams/gameserver-states.dot.png){{% /feature %}}

‎site/static/diagrams/gameserver-states.dot‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ digraph {
1111
Scheduled
1212
RequestReady
1313
Ready
14+
Reserved
1415
Allocated
1516
Shutdown
1617
Unhealthy
@@ -23,21 +24,29 @@ digraph {
2324
PortAllocation -> Creating [ label="allocated unused port", color="blue" ]
2425
Creating -> Starting [ label="created pod", color="blue" ]
2526
Starting -> Scheduled [ label="we have a pod, fetch its address", color="blue" ]
27+
Scheduled -> Reserved [ label="SDK.reserved(seconds)", color="purple" ]
2628
Scheduled -> RequestReady [ label="SDK.ready()", color="purple" ]
2729
RequestReady -> Ready [ label="ready to be allocated", color="blue" ]
30+
Reserved -> Ready [label="if seconds > 0 \land failed to call \lSDK.allocate() " color="purple"]
31+
2832
Ready -> Allocated [ label="allocated for use", color="orange" ]
33+
Ready -> Allocated [ label="SDK.allocate() ", color="purple" ]
34+
Reserved -> Allocated [color="purple"]
2935

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

3238
Scheduled -> Shutdown [ label="SDK.shutdown()", color="purple" ]
3339
RequestReady -> Shutdown [ color="purple" ]
3440
Ready -> Shutdown [ color="purple" ]
3541
Allocated -> Shutdown [ color="purple" ]
42+
Reserved -> Shutdown [ color="purple" ]
43+
3644

37-
Scheduled -> Unhealthy [ label="failed to call SDK.healthy()\nin a timely manner" ]
45+
Scheduled -> Unhealthy [ label="failed to call SDK.healthy()\nin a timely manner" color="purple" ]
3846
RequestReady -> Unhealthy [ color="purple" ]
3947
Ready -> Unhealthy [ color="purple" ]
4048
Allocated -> Unhealthy [ color="purple" ]
49+
Reserved -> Unhealthy [ color="purple" ]
4150

4251
Unhealthy -> Deleted [ label="delete unhealthy game server", color="blue" ]
4352
Shutdown -> Deleted [ label="delete finished game server", color="blue" ]
135 KB
Loading
41.3 KB
Loading

0 commit comments

Comments
 (0)