Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions install/helm/agones/templates/crds/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ spec:
- name: v1
served: true
storage: true
{{- with .Values.gameservers.selectableFields }}
selectableFields:
{{- range . }}
- jsonPath: {{ . }}
{{- end }}
{{- end }}
additionalPrinterColumns:
- jsonPath: .status.state
name: State
Expand Down
3 changes: 3 additions & 0 deletions install/helm/agones/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ gameservers:
# requires feature gate PortRanges to be enabled
# game: [9000, 10000]
podPreserveUnknownFields: false
selectableFields:
- .status.state
- .status.nodeName
lists:
maxItems: 1000

Expand Down
3 changes: 3 additions & 0 deletions install/yaml/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7397,6 +7397,9 @@ spec:
- name: v1
served: true
storage: true
selectableFields:
- jsonPath: .status.state
- jsonPath: .status.nodeName
additionalPrinterColumns:
- jsonPath: .status.state
name: State
Expand Down
19 changes: 11 additions & 8 deletions site/content/en/docs/Installation/Install Agones/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,14 +390,17 @@ The following tables lists the configurable parameters of the Agones chart and t

### GameServers

| Parameter | Description | Default |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `gameservers.namespaces` | a list of namespaces you are planning to use to deploy game servers | `["default"]` |
| `gameservers.minPort` | Minimum port to use for dynamic port allocation | `7000` |
| `gameservers.maxPort` | Maximum port to use for dynamic port allocation | `8000` |
| `gameservers.additionalPortRanges` | Port ranges from which to do named dynamic port allocation. Example: <br /> additionalPortRanges: <br />&nbsp;&nbsp;game: [9000, 10000] | `{}` |
| `gameservers.podPreserveUnknownFields` | Disable [field pruning][pruning] and schema validation on the Pod template for a [GameServer][gameserver] definition | `false` |
| `gameservers.lists.maxItems` | The maximum number of items that can be specified for a list. | `1000` |
| Parameter | Description | Default |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------|
| `gameservers.namespaces` | a list of namespaces you are planning to use to deploy game servers | `["default"]` |
| `gameservers.minPort` | Minimum port to use for dynamic port allocation | `7000` |
| `gameservers.maxPort` | Maximum port to use for dynamic port allocation | `8000` |
| `gameservers.additionalPortRanges` | Port ranges from which to do named dynamic port allocation. Example: <br /> additionalPortRanges: <br />&nbsp;&nbsp;game: [9000, 10000] | `{}` |
| `gameservers.podPreserveUnknownFields` | Disable [field pruning][pruning] and schema validation on the Pod template for a [GameServer][gameserver] definition | `false` |
{{% feature publishVersion="1.58.0" %}}
| `gameservers.selectableFields` | spec fields available or querying [GameServer][gameserver] resources based | `[".status.state", "status.nodeName"]` |
{{% /feature %}}
| `gameservers.lists.maxItems` | The maximum number of items that can be specified for a list. | `1000` |


### Helm Installation
Expand Down
11 changes: 11 additions & 0 deletions site/content/en/docs/Reference/gameserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ The `spec` field is the actual GameServer specification and it is composed as fo
The GameServer resource does not support updates. If you need to make regular updates to the GameServer spec, consider using a [Fleet]({{< ref "/docs/Reference/fleet.md" >}}).
{{% /alert %}}

{{% feature publishVersion="1.58.0" %}}
## Selectable fields

Agones supports selectable fields for querying `GameServer` resources based on spec field values. This feature enables efficient server-side filtering of `GameServer` resources.

The following spec fields are available for field selectors in `GameServer` resources:
- status.state - The lifecycle of the `GameServer` (See **GameServer State Diagram**)
- status.nodeName - The node which the `GameServer` is running on

{{% /feature %}}

## Sidecar Containers

Agones supports the use of [Sidecar Containers](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) with exposed ports.
Expand Down
Loading