Skip to content

Commit 1881d54

Browse files
authored
Remove / Expire FleetAllocation from documentation. (agones-dev#867)
Hide FleetAllocation for 0.12, and also move more documentation to drive users more towards GameServerAllocations from the outset.
1 parent 615ab72 commit 1881d54

8 files changed

Lines changed: 74 additions & 30 deletions

File tree

‎site/content/en/docs/Examples/_index.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ These are full examples for each of the resource types of Agones
1313
1414
- {{< ghlink href="examples/gameserver.yaml" >}}Full GameServer Configuration{{< /ghlink >}}
1515
- {{< ghlink href="examples/fleet.yaml" >}}Full Fleet Configuration{{< /ghlink >}}
16+
{{< feature expiryVersion="0.12.0" >}}
1617
- {{< ghlink href="examples/fleetallocation.yaml" >}}Full Fleet Allocation Configuration (deprecated) {{< /ghlink >}}
18+
{{< /feature >}}
1719
- {{< ghlink href="examples/gameserverallocation.yaml" >}}Full GameServer Allocation Configuration{{< /ghlink >}}
1820
- {{< ghlink href="examples/fleetautoscaler.yaml" >}}Full Autoscaler Configuration with Buffer Strategy{{< /ghlink >}}
1921
- {{< ghlink href="examples/webhookfleetautoscaler.yaml" >}}Full Autoscaler Configuration with Webhook Strategy{{< /ghlink >}}

‎site/content/en/docs/Getting Started/create-fleet.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,9 @@ players access it (and therefore, it should not be deleted until they are finish
152152
> In production, you would likely do the following through a [Kubernetes API call]({{< ref "/docs/Guides/access-api.md" >}}), but we can also
153153
do this through `kubectl` as well, and ask it to return the response in yaml so that we can see what has happened.
154154

155+
{{< feature expiryVersion="0.12.0" >}}
155156
#### GameServerAllocation
156-
157-
> GameServerAllocation will eventually replace FleetAllocation, but is currently experimental, and likely to change in upcoming releases.
158-
However, we welcome you to test it out in its current format and provide feedback.
157+
{{< /feature >}}
159158

160159
We can do allocation of a GameServer for usage through a `GameServerAllocation`, which will both
161160
return to us the details of a `GameServer` (assuming one is available), and also move it to the `Allocated` state,
@@ -231,6 +230,7 @@ simple-udp-sdhzn-wnhsw Ready 192.168.122.205 7478 minikube 52m
231230
> `GameServerAllocations` are create only and not stored for performance reasons, so you won't be able to list
232231
them after they have been created - but you can see their effects on `GameServers`
233232
233+
{{< feature expiryVersion="0.12.0" >}}
234234
#### FleetAllocation
235235
236236
> Fleet Allocation is **deprecated** in version 0.10.0, and will be removed in the 0.12.0 release.
@@ -323,6 +323,7 @@ status:
323323
If you see the `status` section, you should see that there is a `GameServer`, and if you look at its
324324
`status > state` value, you can also see that it has been moved to `Allocated`. This means you have been successfully
325325
allocated a `GameServer` out of the fleet, and you can now connect your players to it!
326+
{{< /feature >}}
326327
327328
A handy trick for checking to see how many `GameServers` you have `Allocated` vs `Ready`, run the following:
328329

‎site/content/en/docs/Getting Started/create-fleetautoscaler.md‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,19 @@ If you're interested in more details for game server allocation, you should cons
9797
In here we are only interested in triggering allocations to see the autoscaler in action.
9898

9999
```
100-
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-udp/fleetallocation.yaml -o yaml
100+
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-udp/gameserverallocation.yaml -o yaml
101101
```
102102

103103
You should get in return the allocated game server details, which should end with something like:
104104
```
105-
status:
106-
address: 10.30.64.99
107-
nodeName: universal3
108-
ports:
109-
- name: default
110-
port: 7131
111-
state: Allocated
105+
status:
106+
address: 34.94.118.237
107+
gameServerName: simple-udp-v6jwb-6bzkz
108+
nodeName: gke-test-cluster-default-f11755a7-5km3
109+
ports:
110+
- name: default
111+
port: 7832
112+
state: Allocated
112113
```
113114

114115
Note the address and port, you might need them later to connect to the server.
@@ -168,7 +169,7 @@ Since we've only got one allocation, we'll just grab the details of the IP and p
168169
only allocated `GameServer`:
169170

170171
```
171-
kubectl get $(kubectl get fleetallocation -o name) -o jsonpath='{.status.GameServer.status.GameServer.status.ports[0].port}'
172+
kubectl get gameservers | grep Allocated | awk '{print $3":"$4 }'
172173
```
173174

174175
This should output your Game Server IP address and port. (eg `10.130.65.208:7936`)

‎site/content/en/docs/Getting Started/create-webhook-fleetautoscaler.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,25 +138,25 @@ If you're interested in more details for game server allocation, you should cons
138138
Here we only interested in triggering allocations to see the autoscaler in action.
139139

140140
```
141-
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-udp/fleetallocation.yaml -o yaml
141+
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-udp/gameserverallocation.yaml -o yaml
142142
```
143143

144144
You should get in return the allocated game server details, which should end with something like:
145145
```
146-
status:
147-
address: 35.247.13.175
148-
nodeName: gke-test-cluster-default-1c5dec79-qrqv
149-
ports:
150-
- name: default
151-
port: 7047
152-
state: Allocated
146+
status:
147+
address: 34.94.118.237
148+
gameServerName: simple-udp-v6jwb-6bzkz
149+
nodeName: gke-test-cluster-default-f11755a7-5km3
150+
ports:
151+
- name: default
152+
port: 7832
153153
```
154154

155155
Note the address and port, you might need them later to connect to the server.
156156

157157
Run the kubectl command one more time so that we have both servers allocated:
158158
```
159-
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-udp/fleetallocation.yaml -o yaml
159+
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-udp/gameserverallocation.yaml -o yaml
160160
```
161161

162162
#### 6. Check new Autoscaler and Fleet status
@@ -364,7 +364,7 @@ If you're interested in more details for game server allocation, you should cons
364364
Here we only interested in triggering allocations to see the autoscaler in action.
365365

366366
```
367-
for i in {0..1} ; do kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/master/examples/simple-udp/fleetallocation.yaml -o yaml ; done
367+
for i in {0..1} ; do kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/master/examples/simple-udp/gameserverallocation.yaml -o yaml ; done
368368
```
369369

370370
#### 7. Check new Autoscaler and Fleet status

‎site/content/en/docs/Guides/Client SDKs/_index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ This can be useful to track `GameServer > Status > State` changes, `metadata` ch
9898

9999
In combination with this SDK, manipulating [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) and
100100
[Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) can also be a useful way to communicate information through to running game server processes from outside those processes.
101-
This is especially useful when combined with `FleetAllocation` [applied metadata]({{< ref "/docs/Reference/fleet.md#fleet-allocation-specification" >}}).
101+
This is especially useful when combined with `GameServerAllocation` [applied metadata]({{< ref "/docs/Reference/fleet.md#gameserver-allocation-specification" >}}).
102102

103103
Since the GameServer contains an entire [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates)
104104
the returned object is limited to that configuration that was deemed useful. If there are

‎site/content/en/docs/Guides/access-api.md‎

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,46 @@ $ curl http://localhost:8001/apis/stable.agones.dev/v1alpha1/namespaces/default/
234234
}
235235
}
236236

237-
# allocate a gameserver from a fleet named 'simple-udp'
237+
# allocate a gameserver from a fleet named 'simple-udp', with GameServerAllocation
238+
239+
$ curl -d '{"apiVersion":"allocation.agones.dev/v1alpha1","kind":"GameServerAllocation","spec":{"required":{"matchLabels":{"stable.agones.dev/fleet":"simple-udp"}}}}' -H "Content-Type: application/json" -X POST http://localhost:8001/apis/allocation.agones.dev/v1alpha1/namespaces/default/gameserverallocations
240+
241+
{
242+
"kind": "GameServerAllocation",
243+
"apiVersion": "allocation.agones.dev/v1alpha1",
244+
"metadata": {
245+
"name": "simple-udp-v6jwb-cmdcv",
246+
"namespace": "default",
247+
"creationTimestamp": "2019-07-03T17:19:47Z"
248+
},
249+
"spec": {
250+
"multiClusterSetting": {
251+
"policySelector": {}
252+
},
253+
"required": {
254+
"matchLabels": {
255+
"stable.agones.dev/fleet": "simple-udp"
256+
}
257+
},
258+
"scheduling": "Packed",
259+
"metadata": {}
260+
},
261+
"status": {
262+
"state": "Allocated",
263+
"gameServerName": "simple-udp-v6jwb-cmdcv",
264+
"ports": [
265+
{
266+
"name": "default",
267+
"port": 7445
268+
}
269+
],
270+
"address": "34.94.118.237",
271+
"nodeName": "gke-test-cluster-default-f11755a7-5km3"
272+
}
273+
}
274+
275+
{{% feature expiryVersion="0.12.0" %}}
276+
# allocate a gameserver from a fleet named 'simple-udp', with the deprecated FleetAllocation
238277

239278
$ curl -d '{"apiVersion":"stable.agones.dev/v1alpha1","kind":"FleetAllocation","metadata":{"generateName":"simple-udp-", "namespace": "default"},"spec":{"fleetName":"simple-udp"}}' -H "Content-Type: application/json" -X POST http://localhost:8001/apis/stable.agones.dev/v1alpha1/namespaces/default/fleetallocations
240279

@@ -339,6 +378,8 @@ $ curl -d '{"apiVersion":"stable.agones.dev/v1alpha1","kind":"FleetAllocation","
339378
}
340379
}
341380
}
381+
{{% /feature %}}
382+
342383
```
343384

344385
You may wish to review the [Agones Kubernetes API]({{< ref "/docs/Reference/agones_crd_api_reference.html" >}}) for the full data structure reference.

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: "A `Fleet` is a set of warm GameServers that are available to be al
66
weight: 20
77
---
88

9-
To allocate a `GameServer` from a `Fleet`, use a `FleetAllocation`.
9+
To allocate a `GameServer` from a `Fleet`, use a `GameServerAllocation`.
1010

1111
Like any other Kubernetes resource you describe a `Fleet`'s desired state via a specification written in YAML or JSON to the Kubernetes API. The Agones controller will then change the actual state to the desired state.
1212

@@ -77,9 +77,6 @@ The `spec` field is the actual `Fleet` specification and it is composed as follo
7777

7878
## GameServer Allocation Specification
7979

80-
> GameServerAllocation will eventually replace FleetAllocation, but is currently experimental, and likely to change in upcoming releases.
81-
However, we welcome you to test it out in its current format and provide feedback.
82-
8380
A `GameServerAllocation` is used to atomically allocate a GameServer out of a set of GameServers.
8481
This could be a single Fleet, multiple Fleets, or a self managed group of GameServers.
8582

@@ -142,6 +139,7 @@ The `spec` field is the actual `GameServerAllocation` specification and it is co
142139
- `metadata` is an optional list of custom labels and/or annotations that will be used to patch
143140
the game server's metadata in the moment of allocation. This can be used to tell the server necessary session data
144141

142+
{{< feature expiryVersion="0.12.0" >}}
145143
## Fleet Allocation Specification
146144

147145
> Fleet Allocation is **deprecated** in version 0.10.0, and will be removed in the 0.12.0 release.
@@ -175,6 +173,7 @@ The `spec` field is the actual `FleetAllocation` specification and it is compose
175173
when the `FleetAllocation` is created
176174
- `metadata` is an optional list of custom labels and/or annotations that will be used to patch
177175
the game server's metadata in the moment of allocation. This can be used to tell the server necessary session data
176+
{{< /feature >}}
178177

179178
## Fleet Scale Subresource Specification
180179

‎site/content/en/docs/Tutorials/allocator-service-go.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: >
88
---
99

1010
To do this, we will implement a [Service](https://kubernetes.io/docs/concepts/services-networking/service/) which allocates a
11-
Game Server on demand by calling the Create() method of the FleetAllocationInterface. After creating the fleet
11+
Game Server on demand by calling the Create() method of the GameServerAllocationInterface. After creating the fleet
1212
allocation, we will return the JSON encoded GameServerStatus of the allocated GameServer.
1313

1414
The type of service we will be learning about could be used by a game client to connect directly to a dedicated Game Server, as part of a larger system, such as a matchmaker service, or in conjunction with a database of level transition data. We will be using the service as a vehicle with which to execute the API calls found in our main.go file.
@@ -163,7 +163,7 @@ allocatorw3secret kubernetes.io/tls 2 15s
163163

164164

165165
### 5. Create the Service Account
166-
This service will interact with Agones via the Agones API by using a [service account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) named fleet-allocator. Specifically, the fleet-allocator service account is granted permissions to perform create operations against FleetAllocation objects, and get operations against Fleet objects.
166+
This service will interact with Agones via the Agones API by using a [service account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) named fleet-allocator. Specifically, the fleet-allocator service account is granted permissions to perform create operations against GameServerAllocation objects, and get operations against Fleet objects.
167167

168168
Create the service account by changing directories to your local agones/examples/allocator-service directory and running this command:
169169
```

0 commit comments

Comments
 (0)