Skip to content

Commit

Permalink
Adds DeleteValues documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
igooch committed Dec 2, 2024
1 parent 71e382c commit 9786b90
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
3 changes: 3 additions & 0 deletions examples/gameserverallocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,6 @@ spec:
- x7un
- 8inz
capacity: 40 # Updates the maximum capacity of the Counter to this number. Min 0, Max 1000.
deleteValues: # removes values from a List's Valules array. Any nonexistant values are ignored.
- alice
- bob
16 changes: 14 additions & 2 deletions site/content/en/docs/Guides/access-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: >
---

Installing Agones creates several [Custom Resource Definitions (CRD)](https://kubernetes.io/docs/concepts/api-extension/custom-resources),
which can be accessed and manipulated through the Kubernetes API.
which can be accessed and manipulated through the Kubernetes API.

The detailed list of Agones CRDs with their parameters could be found here - [Agones CRD API Reference](../../reference/agones_crd_api_reference/).

Expand Down Expand Up @@ -402,7 +402,19 @@ curl http://localhost:8001/apis/agones.dev/v1/namespaces/default/gameservers

### Allocate a gameserver from a fleet named 'simple-game-server', with GameServerAllocation
```bash
curl -d '{"apiVersion":"allocation.agones.dev/v1","kind":"GameServerAllocation","spec":{"required":{"matchLabels":{"agones.dev/fleet":"simple-game-server"}}}}' -H "Content-Type: application/json" -X POST http://localhost:8001/apis/allocation.agones.dev/v1/namespaces/default/gameserverallocations
curl -d '{
"apiVersion": "allocation.agones.dev/v1",
"kind": "GameServerAllocation",
"spec": {
"selectors": [
{
"matchLabels": {
"agones.dev/fleet": "simple-game-server"
}
}
]
}
}' -H "Content-Type: application/json" -X POST http://localhost:8001/apis/allocation.agones.dev/v1/namespaces/default/gameserverallocations
```
```
{
Expand Down
7 changes: 5 additions & 2 deletions site/content/en/docs/Reference/gameserverallocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
containsValue: "x6k8z" # only match GameServers who has this value in the list. Defaults to "", which is all.
minAvailable: 1 # minimum available (current capacity - current count). Defaults to 0.
maxAvailable: 10 # maximum available (current capacity - current count) Defaults to 0, which translates to max(int64)
# [Stage:Alpha]
# [Stage:Alpha]
# [FeatureFlag:PlayerAllocationFilter]
# Provides a filter on minimum and maximum values for player capacity when retrieving a GameServer
# through Allocation. Defaults to no limits.
Expand Down Expand Up @@ -111,6 +111,9 @@ spec:
- x7un
- 8inz
capacity: 40 # Updates the maximum capacity of the Counter to this number. Min 0, Max 1000.
deleteValues: # removes values from a List's Values array. Any nonexistant values are ignored.
- alice
- bob
{{< /tab >}}
{{< tab header="required & preferred (deprecated)" lang="yaml" >}}
apiVersion: "allocation.agones.dev/v1"
Expand Down Expand Up @@ -170,7 +173,7 @@ spec:
annotations:
map: garden22
{{< /tab >}}
{{< /tabpane >}}
{{< /tabpane >}}

The `spec` field is the actual `GameServerAllocation` specification, and it is composed as follows:

Expand Down

0 comments on commit 9786b90

Please sign in to comment.