Agones Kubernetes API

Detailed list of Agones Custom Resource Definitions available

Packages:

agones.dev/v1

Package v1 is the v1 version of the API.

Resource Types:

Fleet

Fleet is the data structure for a Fleet resource

Field Description
apiVersion
string
agones.dev/v1
kind
string
Fleet
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
FleetSpec


replicas
int32

Replicas are the number of GameServers that should be in this set. Defaults to 0.

strategy
Kubernetes apps/v1.DeploymentStrategy

Deployment strategy

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
GameServerTemplateSpec

Template the GameServer template to apply for this Fleet

status
FleetStatus

GameServer

GameServer is the data structure for a GameServer resource. It is worth noting that while there is a GameServerStatus Status entry for the GameServer, it is not defined as a subresource - unlike Fleet and other Agones resources. This is so that we can retain the ability to change multiple aspects of a GameServer in a single atomic operation, which is particularly useful for operations such as allocation.

Field Description
apiVersion
string
agones.dev/v1
kind
string
GameServer
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
GameServerSpec


container
string

Container specifies which Pod container is the game server. Only required if there is more than one container defined

ports
[]GameServerPort

Ports are the array of ports that can be exposed via the game server

health
Health

Health configures health checking

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”

sdkServer
SdkServer

SdkServer specifies parameters for the Agones SDK Server sidecar container

template
Kubernetes core/v1.PodTemplateSpec

Template describes the Pod that will be created for the GameServer

players
PlayersSpec
(Optional)

(Alpha, PlayerTracking feature flag) Players provides the configuration for player tracking features.

status
GameServerStatus

GameServerSet

GameServerSet is the data structure for a set of GameServers. This matches philosophically with the relationship between Deployments and ReplicaSets

Field Description
apiVersion
string
agones.dev/v1
kind
string
GameServerSet
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
GameServerSetSpec


replicas
int32

Replicas are the number of GameServers that should be in this set

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
GameServerTemplateSpec

Template the GameServer template to apply for this GameServerSet

status
GameServerSetStatus

AggregatedPlayerStatus

(Appears on: FleetStatus, GameServerSetStatus)

AggregatedPlayerStatus stores total player tracking values

Field Description
count
int64
capacity
int64

FleetSpec

(Appears on: Fleet)

FleetSpec is the spec for a Fleet

Field Description
replicas
int32

Replicas are the number of GameServers that should be in this set. Defaults to 0.

strategy
Kubernetes apps/v1.DeploymentStrategy

Deployment strategy

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
GameServerTemplateSpec

Template the GameServer template to apply for this Fleet

FleetStatus

(Appears on: Fleet, FleetAutoscaleRequest)

FleetStatus is the status of a Fleet

Field Description
replicas
int32

Replicas the total number of current GameServer replicas

readyReplicas
int32

ReadyReplicas are the number of Ready GameServer replicas

reservedReplicas
int32

ReservedReplicas are the total number of Reserved GameServer replicas in this fleet. Reserved instances won’t be deleted on scale down, but won’t cause an autoscaler to scale up.

allocatedReplicas
int32

AllocatedReplicas are the number of Allocated GameServer replicas

players
AggregatedPlayerStatus
(Optional)

[Stage:Alpha] [FeatureFlag:PlayerTracking] Players are the current total player capacity and count for this Fleet

GameServerPort

(Appears on: GameServerSpec)

GameServerPort defines a set of Ports that are to be exposed via the GameServer

Field Description
name
string

Name is the descriptive name of the port

portPolicy
PortPolicy

PortPolicy defines the policy for how the HostPort is populated. Dynamic port will allocate a HostPort within the selected MIN_PORT and MAX_PORT range passed to the controller at installation time. When Static portPolicy is specified, HostPort is required, to specify the port that game clients will connect to

container
string
(Optional)

Container is the name of the container on which to open the port. Defaults to the game server container. This field is beta-level and is enabled by default, could be disabled by the “ContainerPortAllocation” feature.

containerPort
int32

ContainerPort is the port that is being opened on the specified container’s process

hostPort
int32

HostPort the port exposed on the host for clients to connect to

protocol
Kubernetes core/v1.Protocol

Protocol is the network protocol being used. Defaults to UDP. TCP and TCPUDP are other options.

GameServerSetSpec

(Appears on: GameServerSet)

GameServerSetSpec the specification for GameServerSet

Field Description
replicas
int32

Replicas are the number of GameServers that should be in this set

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
GameServerTemplateSpec

Template the GameServer template to apply for this GameServerSet

GameServerSetStatus

(Appears on: GameServerSet)

GameServerSetStatus is the status of a GameServerSet

Field Description
replicas
int32

Replicas is the total number of current GameServer replicas

readyReplicas
int32

ReadyReplicas is the number of Ready GameServer replicas

reservedReplicas
int32

ReservedReplicas is the number of Reserved GameServer replicas

allocatedReplicas
int32

AllocatedReplicas is the number of Allocated GameServer replicas

shutdownReplicas
int32

ShutdownReplicas is the number of Shutdown GameServers replicas

players
AggregatedPlayerStatus
(Optional)

[Stage:Alpha] [FeatureFlag:PlayerTracking] Players is the current total player capacity and count for this GameServerSet

GameServerSpec

(Appears on: GameServer, GameServerTemplateSpec)

GameServerSpec is the spec for a GameServer resource

Field Description
container
string

Container specifies which Pod container is the game server. Only required if there is more than one container defined

ports
[]GameServerPort

Ports are the array of ports that can be exposed via the game server

health
Health

Health configures health checking

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”

sdkServer
SdkServer

SdkServer specifies parameters for the Agones SDK Server sidecar container

template
Kubernetes core/v1.PodTemplateSpec

Template describes the Pod that will be created for the GameServer

players
PlayersSpec
(Optional)

(Alpha, PlayerTracking feature flag) Players provides the configuration for player tracking features.

GameServerState (string alias)

(Appears on: GameServerStatus)

GameServerState is the state for the GameServer

GameServerStatus

(Appears on: GameServer)

GameServerStatus is the status for a GameServer resource

Field Description
state
GameServerState

GameServerState is the current state of a GameServer, e.g. Creating, Starting, Ready, etc

ports
[]GameServerStatusPort
address
string
nodeName
string
reservedUntil
Kubernetes meta/v1.Time
players
PlayerStatus
(Optional)

[Stage:Alpha] [FeatureFlag:PlayerTracking]

GameServerStatusPort

(Appears on: GameServerAllocationStatus, GameServerStatus)

GameServerStatusPort shows the port that was allocated to a GameServer.

Field Description
name
string
port
int32

GameServerTemplateSpec

(Appears on: FleetSpec, GameServerSetSpec)

GameServerTemplateSpec is a template for GameServers

Field Description
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
GameServerSpec


container
string

Container specifies which Pod container is the game server. Only required if there is more than one container defined

ports
[]GameServerPort

Ports are the array of ports that can be exposed via the game server

health
Health

Health configures health checking

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”

sdkServer
SdkServer

SdkServer specifies parameters for the Agones SDK Server sidecar container

template
Kubernetes core/v1.PodTemplateSpec

Template describes the Pod that will be created for the GameServer

players
PlayersSpec
(Optional)

(Alpha, PlayerTracking feature flag) Players provides the configuration for player tracking features.

Health

(Appears on: GameServerSpec)

Health configures health checking on the GameServer

Field Description
disabled
bool

Disabled is whether health checking is disabled or not

periodSeconds
int32

PeriodSeconds is the number of seconds each health ping has to occur in

failureThreshold
int32

FailureThreshold how many failures in a row constitutes unhealthy

initialDelaySeconds
int32

InitialDelaySeconds initial delay before checking health

PlayerStatus

(Appears on: GameServerStatus)

PlayerStatus stores the current player capacity values

Field Description
count
int64
capacity
int64
ids
[]string

PlayersSpec

(Appears on: GameServerSpec)

PlayersSpec tracks the initial player capacity

Field Description
initialCapacity
int64

PortPolicy (string alias)

(Appears on: GameServerPort)

PortPolicy is the port policy for the GameServer

SdkServer

(Appears on: GameServerSpec)

SdkServer specifies parameters for the Agones SDK Server sidecar container

Field Description
logLevel
SdkServerLogLevel

LogLevel for SDK server (sidecar) logs. Defaults to “Info”

grpcPort
int32

GRPCPort is the port on which the SDK Server binds the gRPC server to accept incoming connections

httpPort
int32

HTTPPort is the port on which the SDK Server binds the HTTP gRPC gateway server to accept incoming connections

SdkServerLogLevel (string alias)

(Appears on: SdkServer)

SdkServerLogLevel is the log level for SDK server (sidecar) logs


allocation.agones.dev/v1

Package v1 is the v1 version of the API.

Resource Types:

GameServerAllocation

GameServerAllocation is the data structure for allocating against a set of GameServers, defined required and preferred selectors

Field Description
apiVersion
string
allocation.agones.dev/v1
kind
string
GameServerAllocation
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
GameServerAllocationSpec


multiClusterSetting
MultiClusterSetting

MultiClusterPolicySelector if specified, multi-cluster policies are applied. Otherwise, allocation will happen locally.

required
Kubernetes meta/v1.LabelSelector

Required The required allocation. Defaults to all GameServers.

preferred
[]Kubernetes meta/v1.LabelSelector

Preferred ordered list of preferred allocations out of the required set. If the first selector is not matched, the selection attempts the second selector, and so on.

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

metadata
MetaPatch

MetaPatch is optional custom metadata that is added to the game server at allocation You can use this to tell the server necessary session data

status
GameServerAllocationStatus

GameServerAllocationSpec

(Appears on: GameServerAllocation)

GameServerAllocationSpec is the spec for a GameServerAllocation

Field Description
multiClusterSetting
MultiClusterSetting

MultiClusterPolicySelector if specified, multi-cluster policies are applied. Otherwise, allocation will happen locally.

required
Kubernetes meta/v1.LabelSelector

Required The required allocation. Defaults to all GameServers.

preferred
[]Kubernetes meta/v1.LabelSelector

Preferred ordered list of preferred allocations out of the required set. If the first selector is not matched, the selection attempts the second selector, and so on.

scheduling
agones.dev/agones/pkg/apis.SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

metadata
MetaPatch

MetaPatch is optional custom metadata that is added to the game server at allocation You can use this to tell the server necessary session data

GameServerAllocationState (string alias)

(Appears on: GameServerAllocationStatus)

GameServerAllocationState is the Allocation state

GameServerAllocationStatus

(Appears on: GameServerAllocation)

GameServerAllocationStatus is the status for an GameServerAllocation resource

Field Description
state
GameServerAllocationState

GameServerState is the current state of an GameServerAllocation, e.g. Allocated, or UnAllocated

gameServerName
string
ports
[]GameServerStatusPort
address
string
nodeName
string

MetaPatch

(Appears on: GameServerAllocationSpec)

MetaPatch is the metadata used to patch the GameServer metadata on allocation

Field Description
labels
map[string]string
annotations
map[string]string

MultiClusterSetting

(Appears on: GameServerAllocationSpec)

MultiClusterSetting specifies settings for multi-cluster allocation.

Field Description
enabled
bool
policySelector
Kubernetes meta/v1.LabelSelector

autoscaling.agones.dev/v1

Package v1 is the v1 version of the API.

Resource Types:

FleetAutoscaler

FleetAutoscaler is the data structure for a FleetAutoscaler resource

Field Description
apiVersion
string
autoscaling.agones.dev/v1
kind
string
FleetAutoscaler
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
FleetAutoscalerSpec


fleetName
string
policy
FleetAutoscalerPolicy

Autoscaling policy

status
FleetAutoscalerStatus

BufferPolicy

(Appears on: FleetAutoscalerPolicy)

BufferPolicy controls the desired behavior of the buffer policy.

Field Description
maxReplicas
int32

MaxReplicas is the maximum amount of replicas that the fleet may have. It must be bigger than both MinReplicas and BufferSize

minReplicas
int32

MinReplicas is the minimum amount of replicas that the fleet must have If zero, it is ignored. If non zero, it must be smaller than MaxReplicas and bigger than BufferSize

bufferSize
k8s.io/apimachinery/pkg/util/intstr.IntOrString

BufferSize defines how many replicas the autoscaler tries to have ready all the time Value can be an absolute number (ex: 5) or a percentage of desired gs instances (ex: 15%) Absolute number is calculated from percentage by rounding up. Example: when this is set to 20%, the autoscaler will make sure that 20% of the fleet’s game server replicas are ready. When this is set to 20, the autoscaler will make sure that there are 20 available game servers Must be bigger than 0 Note: by “ready” we understand in this case “non-allocated”; this is done to ensure robustness and computation stability in different edge case (fleet just created, not enough capacity in the cluster etc)

FleetAutoscaleRequest

(Appears on: FleetAutoscaleReview)

FleetAutoscaleRequest defines the request to webhook autoscaler endpoint

Field Description
uid
k8s.io/apimachinery/pkg/types.UID

UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are otherwise identical (parallel requests, requests when earlier requests did not modify etc) The UID is meant to track the round trip (request/response) between the Autoscaler and the WebHook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.

name
string

Name is the name of the Fleet being scaled

namespace
string

Namespace is the namespace associated with the request (if any).

status
FleetStatus

The Fleet’s status values

FleetAutoscaleResponse

(Appears on: FleetAutoscaleReview)

FleetAutoscaleResponse defines the response of webhook autoscaler endpoint

Field Description
uid
k8s.io/apimachinery/pkg/types.UID

UID is an identifier for the individual request/response. This should be copied over from the corresponding FleetAutoscaleRequest.

scale
bool

Set to false if no scaling should occur to the Fleet

replicas
int32

The targeted replica count

FleetAutoscaleReview

FleetAutoscaleReview is passed to the webhook with a populated Request value, and then returned with a populated Response.

Field Description
request
FleetAutoscaleRequest
response
FleetAutoscaleResponse

FleetAutoscalerPolicy

(Appears on: FleetAutoscalerSpec)

FleetAutoscalerPolicy describes how to scale a fleet

Field Description
type
FleetAutoscalerPolicyType

Type of autoscaling policy.

buffer
BufferPolicy
(Optional)

Buffer policy config params. Present only if FleetAutoscalerPolicyType = Buffer.

webhook
WebhookPolicy
(Optional)

Webhook policy config params. Present only if FleetAutoscalerPolicyType = Webhook.

FleetAutoscalerPolicyType (string alias)

(Appears on: FleetAutoscalerPolicy)

FleetAutoscalerPolicyType is the policy for autoscaling for a given Fleet

FleetAutoscalerSpec

(Appears on: FleetAutoscaler)

FleetAutoscalerSpec is the spec for a Fleet Scaler

Field Description
fleetName
string
policy
FleetAutoscalerPolicy

Autoscaling policy

FleetAutoscalerStatus

(Appears on: FleetAutoscaler)

FleetAutoscalerStatus defines the current status of a FleetAutoscaler

Field Description
currentReplicas
int32

CurrentReplicas is the current number of gameserver replicas of the fleet managed by this autoscaler, as last seen by the autoscaler

desiredReplicas
int32

DesiredReplicas is the desired number of gameserver replicas of the fleet managed by this autoscaler, as last calculated by the autoscaler

lastScaleTime
Kubernetes meta/v1.Time
(Optional)

lastScaleTime is the last time the FleetAutoscaler scaled the attached fleet,

ableToScale
bool

AbleToScale indicates that we can access the target fleet

scalingLimited
bool

ScalingLimited indicates that the calculated scale would be above or below the range defined by MinReplicas and MaxReplicas, and has thus been capped.

WebhookPolicy

(Appears on: FleetAutoscalerPolicy)

WebhookPolicy controls the desired behavior of the webhook policy. It contains the description of the webhook autoscaler service used to form url which is accessible inside the cluster

Field Description
url
string
(Optional)

url gives the location of the webhook, in standard URL form (scheme://host:port/path). Exactly one of url or service must be specified.

The host should not refer to a service running in the cluster; use the service field instead. The host might be resolved via external DNS in some apiservers (e.g., kube-apiserver cannot resolve in-cluster DNS as that would be a layering violation). host may also be an IP address.

Please note that using localhost or 127.0.0.1 as a host is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.

The scheme must be “https”; the URL must begin with “https://”.

A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.

Attempting to use a user or basic auth e.g. “user:password@” is not allowed. Fragments (“#…”) and query parameters (“?…”) are not allowed, either.

service
Kubernetes admissionregistration/v1.ServiceReference
(Optional)

service is a reference to the service for this webhook. Either service or url must be specified.

If the webhook is running within the cluster, then you should use service.

caBundle
[]byte
(Optional)

caBundle is a PEM encoded CA bundle which will be used to validate the webhook’s server certificate. If unspecified, system trust roots on the apiserver are used.


multicluster.agones.dev/v1

Package v1 is the v1 version of the API.

Resource Types:

GameServerAllocationPolicy

GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API

Field Description
apiVersion
string
multicluster.agones.dev/v1
kind
string
GameServerAllocationPolicy
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
GameServerAllocationPolicySpec


priority
int32
weight
int
connectionInfo
ClusterConnectionInfo

ClusterConnectionInfo

(Appears on: GameServerAllocationPolicySpec)

ClusterConnectionInfo defines the connection information for a cluster

Field Description
clusterName
string

Optional: the name of the targeted cluster

allocationEndpoints
[]string

The endpoints for the allocator service in the targeted cluster. If the AllocationEndpoints is not set, the allocation happens on local cluster. If there are multiple endpoints any of the endpoints that can handle allocation request should suffice

secretName
string

The name of the secret that contains TLS client certificates to connect the allocator server in the targeted cluster

namespace
string

The cluster namespace from which to allocate gameservers

serverCa
[]byte

The PEM encoded server CA, used by the allocator client to authenticate the remote server.

ConnectionInfoIterator

ConnectionInfoIterator an iterator on ClusterConnectionInfo

Field Description
currPriority
int

currPriority Current priority index from the orderedPriorities

orderedPriorities
[]int32

orderedPriorities list of ordered priorities

priorityToCluster
map[int32]map[string][]*agones.dev/agones/pkg/apis/multicluster/v1.GameServerAllocationPolicy

priorityToCluster Map of priority to cluster-policies map

clusterBlackList
map[string]bool

clusterBlackList the cluster blacklist for the clusters that has already returned

GameServerAllocationPolicySpec

(Appears on: GameServerAllocationPolicy)

GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy

Field Description
priority
int32
weight
int
connectionInfo
ClusterConnectionInfo

Generated with gen-crd-api-reference-docs.