Agones Kubernetes API

Detailed list of Agones Custom Resource Definitions available

Packages:

stable.agones.dev

Package v1alpha1 is the v1alpha1 version of the API.

Resource Types:

Fleet

Fleet is the data structure for a Fleet resource

Field Description
apiVersion
string
stable.agones.dev/v1alpha1
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

strategy
Kubernetes apps/v1.DeploymentStrategy

Deployment strategy

scheduling
SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
GameServerTemplateSpec

Template the GameServer template to apply for this Fleet

status
FleetStatus

FleetAllocation

FleetAllocation is the data structure for allocating against a Fleet

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


fleetName
string
metadata
MetaPatch
status
FleetAllocationStatus

FleetAutoscaler

FleetAutoscaler is the data structure for a FleetAutoscaler resource

Field Description
apiVersion
string
stable.agones.dev/v1alpha1
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

GameServer

(Appears on: FleetAllocationStatus)

GameServer is the data structure for a gameserver resource

Field Description
apiVersion
string
stable.agones.dev/v1alpha1
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
SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
Kubernetes core/v1.PodTemplateSpec

Template describes the Pod that will be created for the GameServer

status
GameServerStatus

GameServerAllocation

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

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


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
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

GameServerSet

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

Field Description
apiVersion
string
stable.agones.dev/v1alpha1
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
SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
GameServerTemplateSpec

Template the GameServer template to apply for this GameServerSet

status
GameServerSetStatus

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)

FleetAllocationSpec

(Appears on: FleetAllocation)

FleetAllocationSpec is the spec for a Fleet Allocation

Field Description
fleetName
string
metadata
MetaPatch

FleetAllocationStatus

(Appears on: FleetAllocation)

FleetAllocationStatus will contain the GameServer that has been allocated from a Fleet

Field Description
gameServer
GameServer

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.

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

strategy
Kubernetes apps/v1.DeploymentStrategy

Deployment strategy

scheduling
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

allocatedReplicas
int32

AllocatedReplicas are the number of Allocated GameServer replicas

GameServerAllocationSpec

(Appears on: GameServerAllocation)

GameServerAllocationSpec is the spec for a GameServerAllocation

Field Description
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
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

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 is the policy specified, HostPort is required, to specify the port that game clients will connect to

containerPort
int32

ContainerPort is the port that is being opened on the game server 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 is the only other option

GameServerSetSpec

(Appears on: GameServerSet)

GameServerSetSpec the specification for

Field Description
replicas
int32

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

scheduling
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 the total number of current GameServer replicas

readyReplicas
int32

ReadyReplicas are the number of Ready GameServer replicas

allocatedReplicas
int32

AllocatedReplicas are the number of Allocated GameServer replicas

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
SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
Kubernetes core/v1.PodTemplateSpec

Template describes the Pod that will be created for the GameServer

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

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
SchedulingStrategy

Scheduling strategy. Defaults to “Packed”.

template
Kubernetes core/v1.PodTemplateSpec

Template describes the Pod that will be created for the GameServer

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

MetaPatch

(Appears on: FleetAllocationSpec, GameServerAllocationSpec)

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

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

PortPolicy (string alias)

(Appears on: GameServerPort)

PortPolicy is the port policy for the GameServer

SchedulingStrategy (string alias)

(Appears on: FleetSpec, GameServerAllocationSpec, GameServerSetSpec, GameServerSpec)

SchedulingStrategy is the strategy that a Fleet & GameServers will use when scheduling GameServers’ Pods across a cluster.

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/v1beta1.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.

Port 443 will be used if it is open, otherwise it is an error.

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.


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