From c61a21ad6cb4f580be0606c7fb54309dc4296ca8 Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Fri, 16 Dec 2022 10:08:02 -0800 Subject: [PATCH] Inline JSON: GameServerAllocation v1.LabelSelector The K8s YAML library will inline embeded structs, but some other ones will not. So adding the `json:",inline"` hint, so that they know that the `v1.LabelSelector` should be inlined if people are so inclined to reference it via Golang yaml libraries. Include regeneration of the crd docs and client libraries, which picked up on some small changes. Closes #2853 --- .../allocation/v1/gameserverallocation.go | 2 +- .../v1/gameserverallocation_test.go | 4 +- .../clientset/versioned/fake/register.go | 14 +- .../clientset/versioned/scheme/register.go | 14 +- .../Reference/agones_crd_api_reference.html | 2483 +++++++++-------- 5 files changed, 1260 insertions(+), 1257 deletions(-) diff --git a/pkg/apis/allocation/v1/gameserverallocation.go b/pkg/apis/allocation/v1/gameserverallocation.go index b0c1e7fd16..19af55b0ca 100644 --- a/pkg/apis/allocation/v1/gameserverallocation.go +++ b/pkg/apis/allocation/v1/gameserverallocation.go @@ -100,7 +100,7 @@ type GameServerAllocationSpec struct { // a GameServer for allocation. type GameServerSelector struct { // See: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - metav1.LabelSelector + metav1.LabelSelector `json:",inline"` // [Stage:Beta] // [FeatureFlag:StateAllocationFilter] // +optional diff --git a/pkg/apis/allocation/v1/gameserverallocation_test.go b/pkg/apis/allocation/v1/gameserverallocation_test.go index 5e9aa3d7d4..f5df0778fa 100644 --- a/pkg/apis/allocation/v1/gameserverallocation_test.go +++ b/pkg/apis/allocation/v1/gameserverallocation_test.go @@ -50,7 +50,7 @@ func TestGameServerAllocationApplyDefaults(t *testing.T) { assert.Equal(t, int64(0), gsa.Spec.Required.Players.MinAvailable) } -//nolint // Current lint duplicate threshold will consider this function is a duplication of the function TestGameServerAllocationSpecSelectors +// nolint // Current lint duplicate threshold will consider this function is a duplication of the function TestGameServerAllocationSpecSelectors func TestGameServerAllocationSpecPreferredSelectors(t *testing.T) { t.Parallel() @@ -78,7 +78,7 @@ func TestGameServerAllocationSpecPreferredSelectors(t *testing.T) { assert.True(t, gsas.Preferred[1].Matches(gs)) } -//nolint // Current lint duplicate threshold will consider this function is a duplication of the function TestGameServerAllocationSpecPreferredSelectors +// nolint // Current lint duplicate threshold will consider this function is a duplication of the function TestGameServerAllocationSpecPreferredSelectors func TestGameServerAllocationSpecSelectors(t *testing.T) { t.Parallel() diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 60b820fe4c..f088a36590 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -43,14 +43,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 6bc85b1225..26ccd2ed72 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -43,14 +43,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/site/content/en/docs/Reference/agones_crd_api_reference.html b/site/content/en/docs/Reference/agones_crd_api_reference.html index b474dd5796..5b877adcee 100644 --- a/site/content/en/docs/Reference/agones_crd_api_reference.html +++ b/site/content/en/docs/Reference/agones_crd_api_reference.html @@ -3029,30 +3029,34 @@

SdkServerLogLevel

Packages:

-

autoscaling.agones.dev/v1

+

agones.dev/v1

Package v1 is the v1 version of the API.

Resource Types: -

FleetAutoscaler +

Fleet

-

FleetAutoscaler is the data structure for a FleetAutoscaler resource

+

Fleet is the data structure for a Fleet resource

@@ -3068,7 +3072,7 @@

FleetAutoscaler string

@@ -3077,7 +3081,7 @@

FleetAutoscaler kind
string -

+ @@ -3108,41 +3112,50 @@

FleetAutoscaler

-autoscaling.agones.dev/v1 +agones.dev/v1
FleetAutoscalerFleet
@@ -3097,8 +3101,8 @@

FleetAutoscaler

spec
- -FleetAutoscalerSpec + +FleetSpec
+ + + +
-fleetName
+replicas
-string +int32
+

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

-policy
+strategy
- -FleetAutoscalerPolicy + +Kubernetes apps/v1.DeploymentStrategy
-

Autoscaling policy

+

Deployment strategy

-sync
+scheduling
- -FleetAutoscalerSync +agones.dev/agones/pkg/apis.SchedulingStrategy + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +GameServerTemplateSpec
-(Optional) -

[Stage:Beta] -[FeatureFlag:CustomFasSyncInterval] -Sync defines when FleetAutoscalers runs autoscaling

+

Template the GameServer template to apply for this Fleet

@@ -3152,8 +3165,8 @@

FleetAutoscaler status
- -FleetAutoscalerStatus + +FleetStatus @@ -3162,14 +3175,14 @@

FleetAutoscaler -

BufferPolicy +

GameServer

-(Appears on: -FleetAutoscalerPolicy) -

-

-

BufferPolicy controls the desired behavior of the buffer policy.

+

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.

@@ -3181,208 +3194,161 @@

BufferPolicy

+ + + + - - -
-maxReplicas
- -int32 - +apiVersion
+string
+ +agones.dev/v1 +
-

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

+kind
+string
GameServer
-minReplicas
+metadata
-int32 + +Kubernetes meta/v1.ObjectMeta +
-

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

+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-bufferSize
+spec
-k8s.io/apimachinery/pkg/util/intstr.IntOrString + +GameServerSpec +
-

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)

-
-

FixedIntervalSync -

-

-(Appears on: -FleetAutoscalerSync) -

-

-

FixedIntervalSync controls the desired behavior of the fixed interval based sync.

-

+
+
- - - - - - - - -
FieldDescription
-seconds
+container
-int32 +string
-

Seconds defines how often we run fleet autoscaling in seconds

+

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

-

FleetAutoscaleRequest -

-

-(Appears on: -FleetAutoscaleReview) -

-

-

FleetAutoscaleRequest defines the request to webhook autoscaler endpoint

-

- - - - - - - - - -
FieldDescription
-uid
+ports
-k8s.io/apimachinery/pkg/types.UID + +[]GameServerPort +
-

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.

+

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

-name
+health
-string + +Health +
-

Name is the name of the Fleet being scaled

+

Health configures health checking

-namespace
+scheduling
-string +agones.dev/agones/pkg/apis.SchedulingStrategy
-

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

+

Scheduling strategy. Defaults to “Packed”

-status
+sdkServer
- -FleetStatus + +SdkServer
-

The Fleet’s status values

+

SdkServer specifies parameters for the Agones SDK Server sidecar container

-

FleetAutoscaleResponse -

-

-(Appears on: -FleetAutoscaleReview) -

-

-

FleetAutoscaleResponse defines the response of webhook autoscaler endpoint

-

- - - - - - - - + +
FieldDescription
-uid
+template
-k8s.io/apimachinery/pkg/types.UID + +Kubernetes core/v1.PodTemplateSpec +
-

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

+

Template describes the Pod that will be created for the GameServer

-scale
+players
-bool + +PlayersSpec +
-

Set to false if no scaling should occur to the Fleet

+(Optional) +

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

+
-replicas
+status
-int32 + +GameServerStatus + -

The targeted replica count

-

FleetAutoscaleReview +

GameServerSet

-

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

-

+

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

+

@@ -3393,108 +3359,148 @@

FleetAutoscaleReview

+ + + + + + + + - - -
-request
+apiVersion
+string
+ +agones.dev/v1 + +
+kind
+string +
GameServerSet
+metadata
- -FleetAutoscaleRequest + +Kubernetes meta/v1.ObjectMeta
+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-response
+spec
- -FleetAutoscaleResponse + +GameServerSetSpec
-
-

FleetAutoscalerPolicy -

-

-(Appears on: -FleetAutoscalerSpec) -

-

-

FleetAutoscalerPolicy describes how to scale a fleet

-

+
+
- - - + + - - + +
FieldDescription +replicas
+ +int32 + +
+

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

+
-type
+scheduling
- -FleetAutoscalerPolicyType - +agones.dev/agones/pkg/apis.SchedulingStrategy
-

Type of autoscaling policy.

+

Scheduling strategy. Defaults to “Packed”.

-buffer
+template
- -BufferPolicy + +GameServerTemplateSpec
-(Optional) -

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

+

Template the GameServer template to apply for this GameServerSet

+
-webhook
+status
- -WebhookPolicy + +GameServerSetStatus -(Optional) -

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

-

FleetAutoscalerPolicyType -(string alias)

+

AggregatedPlayerStatus +

(Appears on: -FleetAutoscalerPolicy) +FleetStatus, +GameServerSetStatus)

-

FleetAutoscalerPolicyType is the policy for autoscaling -for a given Fleet

+

AggregatedPlayerStatus stores total player tracking values

-

FleetAutoscalerSpec + + + + + + + + + + + + + + + + + +
FieldDescription
+count
+ +int64 + +
+
+capacity
+ +int64 + +
+
+

FleetSpec

(Appears on: -FleetAutoscaler) +Fleet)

-

FleetAutoscalerSpec is the spec for a Fleet Scaler

+

FleetSpec is the spec for a Fleet

@@ -3506,53 +3512,63 @@

FleetAutoscalerSpec

+ + + +
-fleetName
+replicas
-string +int32
+

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

-policy
+strategy
- -FleetAutoscalerPolicy + +Kubernetes apps/v1.DeploymentStrategy
-

Autoscaling policy

+

Deployment strategy

-sync
+scheduling
- -FleetAutoscalerSync +agones.dev/agones/pkg/apis.SchedulingStrategy + +
+

Scheduling strategy. Defaults to “Packed”.

+
+template
+ + +GameServerTemplateSpec
-(Optional) -

[Stage:Beta] -[FeatureFlag:CustomFasSyncInterval] -Sync defines when FleetAutoscalers runs autoscaling

+

Template the GameServer template to apply for this Fleet

-

FleetAutoscalerStatus +

FleetStatus

(Appears on: -FleetAutoscaler) +Fleet, +FleetAutoscaleRequest)

-

FleetAutoscalerStatus defines the current status of a FleetAutoscaler

+

FleetStatus is the status of a Fleet

@@ -3564,75 +3580,76 @@

FleetAutoscalerStatus

-currentReplicas
+replicas
int32
-

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

+

Replicas the total number of current GameServer replicas

-desiredReplicas
+readyReplicas
int32
-

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

+

ReadyReplicas are the number of Ready GameServer replicas

-lastScaleTime
+reservedReplicas
- -Kubernetes meta/v1.Time - +int32
-(Optional) -

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

+

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.

-ableToScale
+allocatedReplicas
-bool +int32
-

AbleToScale indicates that we can access the target fleet

+

AllocatedReplicas are the number of Allocated GameServer replicas

-scalingLimited
+players
-bool + +AggregatedPlayerStatus +
-

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

+(Optional) +

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

-

FleetAutoscalerSync +

GameServerPort

(Appears on: -FleetAutoscalerSpec) +GameServerSpec)

-

FleetAutoscalerSync describes when to sync a fleet

+

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

@@ -3644,52 +3661,89 @@

FleetAutoscalerSync

+ + + + + + + + + + + + + + + +
-type
+name
- -FleetAutoscalerSyncType - +string
-

Type of autoscaling sync.

+

Name is the descriptive name of the port

-fixedInterval
+portPolicy
- -FixedIntervalSync + +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) -

FixedInterval config params. Present only if FleetAutoscalerSyncType = FixedInterval.

+

Container is the name of the container on which to open the port. Defaults to the game server container.

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

-

FleetAutoscalerSyncType -(string alias)

-

-(Appears on: -FleetAutoscalerSync) -

-

-

FleetAutoscalerSyncType is the sync strategy for a given Fleet

-

-

WebhookPolicy +

GameServerSetSpec

(Appears on: -FleetAutoscalerPolicy) +GameServerSet)

-

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

+

GameServerSetSpec the specification for GameServerSet

@@ -3701,79 +3755,49 @@

WebhookPolicy

-url
+replicas
-string +int32
-(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.

+

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

-service
+scheduling
- -Kubernetes admissionregistration/v1.ServiceReference - +agones.dev/agones/pkg/apis.SchedulingStrategy
-(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.

+

Scheduling strategy. Defaults to “Packed”.

-caBundle
+template
-[]byte + +GameServerTemplateSpec +
-(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.

+

Template the GameServer template to apply for this GameServerSet

-
-

multicluster.agones.dev/v1

+

GameServerSetStatus +

-

Package v1 is the v1 version of the API.

+(Appears on: +GameServerSet)

-Resource Types: - -

GameServerAllocationPolicy -

-

GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API

+

GameServerSetStatus is the status of a GameServerSet

@@ -3785,93 +3809,86 @@

GameServerAllocat

- - - -
-apiVersion
-string
- -multicluster.agones.dev/v1 - +replicas
+ +int32 +
-kind
-string +

Replicas is the total number of current GameServer replicas

GameServerAllocationPolicy
-metadata
+readyReplicas
- -Kubernetes meta/v1.ObjectMeta - +int32
-Refer to the Kubernetes API documentation for the fields of the -metadata field. +

ReadyReplicas is the number of Ready GameServer replicas

-spec
+reservedReplicas
- -GameServerAllocationPolicySpec - +int32
-
-
- +

ReservedReplicas is the number of Reserved GameServer replicas

+ + - -
-priority
+allocatedReplicas
int32
+

AllocatedReplicas is the number of Allocated GameServer replicas

-weight
+shutdownReplicas
-int +int32
+

ShutdownReplicas is the number of Shutdown GameServers replicas

-connectionInfo
+players
- -ClusterConnectionInfo + +AggregatedPlayerStatus
-
+(Optional) +

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

-

ClusterConnectionInfo +

GameServerSpec

(Appears on: -GameServerAllocationPolicySpec) +GameServer, +GameServerTemplateSpec)

-

ClusterConnectionInfo defines the connection information for a cluster

+

GameServerSpec is the spec for a GameServer resource

@@ -3883,130 +3900,113 @@

ClusterConnectionInfo

- -
-clusterName
+container
string
-

Optional: the name of the targeted cluster

+

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

-allocationEndpoints
+ports
-[]string + +[]GameServerPort +
-

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

+

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

-secretName
+health
-string + +Health +
-

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

+

Health configures health checking

-namespace
+scheduling
-string +agones.dev/agones/pkg/apis.SchedulingStrategy
-

The cluster namespace from which to allocate gameservers

+

Scheduling strategy. Defaults to “Packed”

-serverCa
+sdkServer
-[]byte + +SdkServer +
-

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

+

SdkServer specifies parameters for the Agones SDK Server sidecar container

-

ConnectionInfoIterator -

-

-

ConnectionInfoIterator an iterator on ClusterConnectionInfo

-

- - - - - - - - - - - - - - - -
FieldDescription
-currPriority
+template
-int + +Kubernetes core/v1.PodTemplateSpec +
-

currPriority Current priority index from the orderedPriorities

+

Template describes the Pod that will be created for the GameServer

-orderedPriorities
+players
-[]int32 + +PlayersSpec +
-

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

+(Optional) +

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

-

GameServerAllocationPolicySpec +

GameServerState +(string alias)

+

+(Appears on: +GameServerSelector, +GameServerStatus) +

+

+

GameServerState is the state for the GameServer

+

+

GameServerStatus

(Appears on: -GameServerAllocationPolicy) +GameServer)

-

GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy

+

GameServerStatus is the status for a GameServer resource

@@ -4018,19 +4018,24 @@

GameServerAll

- -
-priority
+state
-int32 + +GameServerState +
+

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

-weight
+ports
-int + +[]GameServerStatusPort +
@@ -4038,146 +4043,87 @@

GameServerAll

-connectionInfo
+address
- -ClusterConnectionInfo - +string
-
-

agones.dev/v1

-

-

Package v1 is the v1 version of the API.

-

-Resource Types: - -

Fleet -

-

-

Fleet is the data structure for a Fleet resource

-

- - - - - - - - - - - - - - - -
FieldDescription
-apiVersion
-string
- -agones.dev/v1 - -
-kind
-string -
Fleet
-metadata
+nodeName
- -Kubernetes meta/v1.ObjectMeta - +string
-Refer to the Kubernetes API documentation for the fields of the -metadata field.
-spec
+reservedUntil
- -FleetSpec + +Kubernetes meta/v1.Time
-
-
- - - - + +
-replicas
- -int32 - -
-

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

-strategy
+players
- -Kubernetes apps/v1.DeploymentStrategy + +PlayerStatus
-

Deployment strategy

+(Optional) +

[Stage:Alpha] +[FeatureFlag:PlayerTracking]

+

GameServerStatusPort +

+

+(Appears on: +GameServerAllocationStatus, +GameServerStatus) +

+

+

GameServerStatusPort shows the port that was allocated to a +GameServer.

+

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

Scheduling strategy. Defaults to “Packed”.

-
FieldDescription
-template
+name
- -GameServerTemplateSpec - +string
-

Template the GameServer template to apply for this Fleet

-
-status
+port
- -FleetStatus - +int32
@@ -4185,14 +4131,15 @@

Fleet

-

GameServer +

GameServerTemplateSpec

-

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.

+(Appears on: +FleetSpec, +GameServerSetSpec) +

+

+

GameServerTemplateSpec is a template for GameServers

@@ -4204,23 +4151,6 @@

GameServer

- - - - - - - -
-apiVersion
-string
- -agones.dev/v1 - -
-kind
-string -
GameServer
metadata
@@ -4338,26 +4268,16 @@

GameServer

- - -status
- - -GameServerStatus - - - - - - -

GameServerSet +

Health

-

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

+(Appears on: +GameServerSpec) +

+

+

Health configures health checking on the GameServer

@@ -4369,93 +4289,92 @@

GameServerSet

+disabled
+ +bool + + + - -
-apiVersion
-string
- -agones.dev/v1 - +

Disabled is whether health checking is disabled or not

-kind
-string +periodSeconds
+ +int32 + +
+

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

GameServerSet
-metadata
+failureThreshold
- -Kubernetes meta/v1.ObjectMeta - +int32
-Refer to the Kubernetes API documentation for the fields of the -metadata field. +

FailureThreshold how many failures in a row constitutes unhealthy

-spec
- - -GameServerSetSpec - - -
-
-
- - - + +
-replicas
+initialDelaySeconds
int32
-

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

+

InitialDelaySeconds initial delay before checking health

+

PlayerStatus +

+

+(Appears on: +GameServerStatus) +

+

+

PlayerStatus stores the current player capacity values

+

+ + + + + + + + - -
FieldDescription
-scheduling
+count
-agones.dev/agones/pkg/apis.SchedulingStrategy +int64
-

Scheduling strategy. Defaults to “Packed”.

-template
+capacity
- -GameServerTemplateSpec - +int64
-

Template the GameServer template to apply for this GameServerSet

-
-status
+ids
- -GameServerSetStatus - +[]string
@@ -4463,15 +4382,14 @@

GameServerSet

-

AggregatedPlayerStatus +

PlayersSpec

(Appears on: -FleetStatus, -GameServerSetStatus) +GameServerSpec)

-

AggregatedPlayerStatus stores total player tracking values

+

PlayersSpec tracks the initial player capacity

@@ -4483,17 +4401,7 @@

AggregatedPlayerStatus

- - - -
-count
- -int64 - -
-
-capacity
+initialCapacity
int64 @@ -4503,14 +4411,23 @@

AggregatedPlayerStatus

-

FleetSpec +

PortPolicy +(string alias)

+

+(Appears on: +GameServerPort) +

+

+

PortPolicy is the port policy for the GameServer

+

+

SdkServer

(Appears on: -Fleet) +GameServerSpec)

-

FleetSpec is the spec for a Fleet

+

SdkServer specifies parameters for the Agones SDK Server sidecar container

@@ -4522,63 +4439,64 @@

FleetSpec

- - - -
-replicas
- -int32 - -
-

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

-
-strategy
+logLevel
- -Kubernetes apps/v1.DeploymentStrategy + +SdkServerLogLevel
-

Deployment strategy

+

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

-scheduling
+grpcPort
-agones.dev/agones/pkg/apis.SchedulingStrategy +int32
-

Scheduling strategy. Defaults to “Packed”.

+

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

-template
+httpPort
- -GameServerTemplateSpec - +int32
-

Template the GameServer template to apply for this Fleet

+

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

-

FleetStatus -

+

SdkServerLogLevel +(string alias)

(Appears on: -Fleet, -FleetAutoscaleRequest) +SdkServer)

-

FleetStatus is the status of a Fleet

+

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

@@ -4590,170 +4508,161 @@

FleetStatus

+ + + + - +
+
+
-replicas
- -int32 - +apiVersion
+string
+ +allocation.agones.dev/v1 +
-

Replicas the total number of current GameServer replicas

+kind
+string
GameServerAllocation
-readyReplicas
+metadata
-int32 + +Kubernetes meta/v1.ObjectMeta +
-

ReadyReplicas are the number of Ready GameServer replicas

+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-reservedReplicas
+spec
-int32 + +GameServerAllocationSpec +
-

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
+multiClusterSetting
-int32 + +MultiClusterSetting +
-

AllocatedReplicas are the number of Allocated GameServer replicas

+

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

-players
+required
- -AggregatedPlayerStatus + +GameServerSelector
-(Optional) -

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

+

Deprecated: use field Selectors instead. If Selectors is set, this field is ignored. +Required is the GameServer selector from which to choose GameServers from. +Defaults to all GameServers.

-

GameServerPort -

-

-(Appears on: -GameServerSpec) -

-

-

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

-

- - - - - - - - - - -
FieldDescription
-name
+preferred
-string + +[]GameServerSelector +
-

Name is the descriptive name of the port

+

Deprecated: use field Selectors instead. If Selectors is set, this field is ignored. +Preferred is an ordered list of preferred GameServer selectors +that are optional to be fulfilled, but will be searched before the required selector. +If the first selector is not matched, the selection attempts the second selector, and so on. +If any of the preferred selectors are matched, the required selector is not considered. +This is useful for things like smoke testing of new game servers.

-portPolicy
+selectors
- -PortPolicy + +[]GameServerSelector
-

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

+

Ordered list of GameServer label selectors. +If the first selector is not matched, the selection attempts the second selector, and so on. +This is useful for things like smoke testing of new game servers. +Note: This field can only be set if neither Required or Preferred is set.

-container
+scheduling
-string +agones.dev/agones/pkg/apis.SchedulingStrategy
-(Optional) -

Container is the name of the container on which to open the port. Defaults to the game server container.

+

Scheduling strategy. Defaults to “Packed”.

-containerPort
+metadata
-int32 + +MetaPatch +
-

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

+

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

-hostPort
- -int32 - -
-

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

+
-protocol
+status
- -Kubernetes core/v1.Protocol + +GameServerAllocationStatus -

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

-

GameServerSetSpec +

GameServerAllocationSpec

(Appears on: -GameServerSet) +GameServerAllocation)

-

GameServerSetSpec the specification for GameServerSet

+

GameServerAllocationSpec is the spec for a GameServerAllocation

@@ -4765,13 +4674,65 @@

GameServerSetSpec

+ + + + + + + + + + + + @@ -4787,27 +4748,37 @@

GameServerSetSpec

-replicas
+multiClusterSetting
-int32 + +MultiClusterSetting +
-

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

+

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

+
+required
+ + +GameServerSelector + + +
+

Deprecated: use field Selectors instead. If Selectors is set, this field is ignored. +Required is the GameServer selector from which to choose GameServers from. +Defaults to all GameServers.

+
+preferred
+ + +[]GameServerSelector + + +
+

Deprecated: use field Selectors instead. If Selectors is set, this field is ignored. +Preferred is an ordered list of preferred GameServer selectors +that are optional to be fulfilled, but will be searched before the required selector. +If the first selector is not matched, the selection attempts the second selector, and so on. +If any of the preferred selectors are matched, the required selector is not considered. +This is useful for things like smoke testing of new game servers.

+
+selectors
+ + +[]GameServerSelector + + +
+

Ordered list of GameServer label selectors. +If the first selector is not matched, the selection attempts the second selector, and so on. +This is useful for things like smoke testing of new game servers. +Note: This field can only be set if neither Required or Preferred is set.

-template
+metadata
- -GameServerTemplateSpec + +MetaPatch
-

Template the GameServer template to apply for this GameServerSet

+

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

-

GameServerSetStatus +

GameServerAllocationState +(string alias)

+

+(Appears on: +GameServerAllocationStatus) +

+

+

GameServerAllocationState is the Allocation state

+

+

GameServerAllocationStatus

(Appears on: -GameServerSet) +GameServerAllocation)

-

GameServerSetStatus is the status of a GameServerSet

+

GameServerAllocationStatus is the status for an GameServerAllocation resource

@@ -4819,86 +4790,82 @@

GameServerSetStatus

-replicas
+state
-int32 + +GameServerAllocationState +
-

Replicas is the total number of current GameServer replicas

+

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

-readyReplicas
+gameServerName
-int32 +string
-

ReadyReplicas is the number of Ready GameServer replicas

-reservedReplicas
+ports
-int32 + +[]GameServerStatusPort +
-

ReservedReplicas is the number of Reserved GameServer replicas

-allocatedReplicas
+address
-int32 +string
-

AllocatedReplicas is the number of Allocated GameServer replicas

-shutdownReplicas
+nodeName
-int32 +string
-

ShutdownReplicas is the number of Shutdown GameServers replicas

-players
+source
- -AggregatedPlayerStatus - +string
-(Optional) -

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

+

If the allocation is from a remote cluster, Source is the endpoint of the remote agones-allocator. +Otherwise, Source is “local”

-

GameServerSpec +

GameServerSelector

(Appears on: -GameServer, -GameServerTemplateSpec) +GameServerAllocationSpec)

-

GameServerSpec is the spec for a GameServer resource

+

GameServerSelector contains all the filter options for selecting +a GameServer for allocation.

@@ -4910,113 +4877,104 @@

GameServerSpec

+ +
-container
+LabelSelector
-string + +Kubernetes meta/v1.LabelSelector +
-

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

+

+(Members of LabelSelector are embedded into this type.) +

+

See: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

-ports
+gameServerState
- -[]GameServerPort + +GameServerState
-

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

+(Optional) +

[Stage:Beta] +[FeatureFlag:StateAllocationFilter] +GameServerState specifies which State is the filter to be used when attempting to retrieve a GameServer +via Allocation. Defaults to “Ready”. The only other option is “Allocated”, which can be used in conjunction with +label/annotation/player selectors to retrieve an already Allocated GameServer.

-health
+players
- -Health + +PlayerSelector
-

Health configures health checking

+(Optional) +

[Stage:Alpha] +[FeatureFlag:PlayerAllocationFilter] +Players provides a filter on minimum and maximum values for player capacity when retrieving a GameServer +through Allocation. Defaults to no limits.

+

MetaPatch +

+

+(Appears on: +GameServerAllocationSpec) +

+

+

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

+

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

Scheduling strategy. Defaults to “Packed”

-
FieldDescription
-sdkServer
+labels
- -SdkServer - +map[string]string
-

SdkServer specifies parameters for the Agones SDK Server sidecar container

-template
+annotations
- -Kubernetes core/v1.PodTemplateSpec - +map[string]string
-

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: -GameServerSelector, -GameServerStatus) -

-

-

GameServerState is the state for the GameServer

-

-

GameServerStatus +

MultiClusterSetting

(Appears on: -GameServer) +GameServerAllocationSpec)

-

GameServerStatus is the status for a GameServer resource

+

MultiClusterSetting specifies settings for multi-cluster allocation.

@@ -5028,56 +4986,9 @@

GameServerStatus

- - - - - - - - - - - - - - - -
-state
- - -GameServerState - - -
-

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

-
-ports
- - -[]GameServerStatusPort - - -
-
-address
- -string - -
-
-nodeName
- -string - -
-
-reservedUntil
+enabled
- -Kubernetes meta/v1.Time - +bool
@@ -5085,31 +4996,26 @@

GameServerStatus

-players
+policySelector
- -PlayerStatus + +Kubernetes meta/v1.LabelSelector
-(Optional) -

[Stage:Alpha] -[FeatureFlag:PlayerTracking]

-

GameServerStatusPort +

PlayerSelector

(Appears on: -GameServerAllocationStatus, -GameServerStatus) +GameServerSelector)

-

GameServerStatusPort shows the port that was allocated to a -GameServer.

+

PlayerSelector is the filter options for a GameServer based on player counts

@@ -5121,9 +5027,9 @@

GameServerStatusPort

-name
+minAvailable
-string +int64
@@ -5131,9 +5037,9 @@

GameServerStatusPort

-port
+maxAvailable
-int32 +int64
@@ -5141,15 +5047,19 @@

GameServerStatusPort

-

GameServerTemplateSpec -

+
+

autoscaling.agones.dev/v1

-(Appears on: -FleetSpec, -GameServerSetSpec) +

Package v1 is the v1 version of the API.

+Resource Types: + +

FleetAutoscaler +

-

GameServerTemplateSpec is a template for GameServers

+

FleetAutoscaler is the data structure for a FleetAutoscaler resource

@@ -5161,6 +5071,23 @@

GameServerTemplateSpec

+ + + + + + + + @@ -5188,106 +5115,68 @@

GameServerTemplateSpec

+apiVersion
+string
+ +autoscaling.agones.dev/v1 + +
+kind
+string +
FleetAutoscaler
metadata
@@ -5177,8 +5104,8 @@

GameServerTemplateSpec

spec
- -GameServerSpec + +FleetAutoscalerSpec
- - - - - - - - - - -
-container
+fleetName
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
+policy
- -Health + +FleetAutoscalerPolicy
-

Health configures health checking

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

Scheduling strategy. Defaults to “Packed”

+

Autoscaling policy

-sdkServer
+sync
- -SdkServer + +FleetAutoscalerSync
-

SdkServer specifies parameters for the Agones SDK Server sidecar container

+(Optional) +

[Stage:Beta] +[FeatureFlag:CustomFasSyncInterval] +Sync defines when FleetAutoscalers runs autoscaling

-template
- - -Kubernetes core/v1.PodTemplateSpec - - -
-

Template describes the Pod that will be created for the GameServer

+
-players
+status
- -PlayersSpec + +FleetAutoscalerStatus -(Optional) -

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

- - - -

Health +

BufferPolicy

(Appears on: -GameServerSpec) +FleetAutoscalerPolicy)

-

Health configures health checking on the GameServer

+

BufferPolicy controls the desired behavior of the buffer policy.

@@ -5299,58 +5188,59 @@

Health

- - - -
-disabled
- -bool - -
-

Disabled is whether health checking is disabled or not

-
-periodSeconds
+maxReplicas
int32
-

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

+

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

-failureThreshold
+minReplicas
int32
-

FailureThreshold how many failures in a row constitutes unhealthy

+

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

-initialDelaySeconds
+bufferSize
-int32 +k8s.io/apimachinery/pkg/util/intstr.IntOrString
-

InitialDelaySeconds initial delay before checking health

+

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)

-

PlayerStatus +

FixedIntervalSync

(Appears on: -GameServerStatus) +FleetAutoscalerSync)

-

PlayerStatus stores the current player capacity values

+

FixedIntervalSync controls the desired behavior of the fixed interval based sync.

@@ -5362,44 +5252,93 @@

PlayerStatus

+ +
-count
+seconds
-int64 +int32
+

Seconds defines how often we run fleet autoscaling in seconds

+

FleetAutoscaleRequest +

+

+(Appears on: +FleetAutoscaleReview) +

+

+

FleetAutoscaleRequest defines the request to webhook autoscaler endpoint

+

+ + + + + + + + + + + + + + + +
FieldDescription
-capacity
+uid
-int64 +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.

-ids
+name
-[]string +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

-

PlayersSpec +

FleetAutoscaleResponse

(Appears on: -GameServerSpec) +FleetAutoscaleReview)

-

PlayersSpec tracks the initial player capacity

+

FleetAutoscaleResponse defines the response of webhook autoscaler endpoint

@@ -5411,33 +5350,88 @@

PlayersSpec

+ + + + + + + +
-initialCapacity
+uid
-int64 +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

-

PortPolicy -(string alias)

-

-(Appears on: -GameServerPort) -

+

FleetAutoscaleReview +

-

PortPolicy is the port policy for the GameServer

+

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

-

SdkServer + + + + + + + + + + + + + + + + + +
FieldDescription
+request
+ + +FleetAutoscaleRequest + + +
+
+response
+ + +FleetAutoscaleResponse + + +
+
+

FleetAutoscalerPolicy

(Appears on: -GameServerSpec) +FleetAutoscalerSpec)

-

SdkServer specifies parameters for the Agones SDK Server sidecar container

+

FleetAutoscalerPolicy describes how to scale a fleet

@@ -5449,64 +5443,65 @@

SdkServer

-logLevel
+type
- -SdkServerLogLevel + +FleetAutoscalerPolicyType
-

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

+

Type of autoscaling policy.

-grpcPort
+buffer
-int32 + +BufferPolicy +
-

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

+(Optional) +

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

-httpPort
+webhook
-int32 + +WebhookPolicy +
-

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

+(Optional) +

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

-

SdkServerLogLevel +

FleetAutoscalerPolicyType (string alias)

(Appears on: -SdkServer) +FleetAutoscalerPolicy)

-

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

+

FleetAutoscalerPolicyType is the policy for autoscaling +for a given Fleet

-
-

allocation.agones.dev/v1

+

FleetAutoscalerSpec +

-

Package v1 is the v1 version of the API.

+(Appears on: +FleetAutoscaler)

-Resource Types: - -

GameServerAllocation -

-

GameServerAllocation is the data structure for allocating against a set of -GameServers, defined selectors selectors

+

FleetAutoscalerSpec is the spec for a Fleet Scaler

@@ -5518,161 +5513,274 @@

GameServerAllocation

+fleetName
+ +string + + + - + +
-apiVersion
-string
- -allocation.agones.dev/v1 -
-kind
-string +policy
+ + +FleetAutoscalerPolicy + + +
+

Autoscaling policy

GameServerAllocation
-metadata
+sync
- -Kubernetes meta/v1.ObjectMeta + +FleetAutoscalerSync
-Refer to the Kubernetes API documentation for the fields of the -metadata field. +(Optional) +

[Stage:Beta] +[FeatureFlag:CustomFasSyncInterval] +Sync defines when FleetAutoscalers runs autoscaling

+

FleetAutoscalerStatus +

+

+(Appears on: +FleetAutoscaler) +

+

+

FleetAutoscalerStatus defines the current status of a FleetAutoscaler

+

+ + + + + + + +
FieldDescription
-spec
+currentReplicas
- -GameServerAllocationSpec - +int32
-
-
- +

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

+ + + +
-multiClusterSetting
+desiredReplicas
- -MultiClusterSetting - +int32
-

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

+

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

-required
+lastScaleTime
- -GameServerSelector + +Kubernetes meta/v1.Time
-

Deprecated: use field Selectors instead. If Selectors is set, this field is ignored. -Required is the GameServer selector from which to choose GameServers from. -Defaults to all GameServers.

+(Optional) +

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

-preferred
+ableToScale
- -[]GameServerSelector - +bool
-

Deprecated: use field Selectors instead. If Selectors is set, this field is ignored. -Preferred is an ordered list of preferred GameServer selectors -that are optional to be fulfilled, but will be searched before the required selector. -If the first selector is not matched, the selection attempts the second selector, and so on. -If any of the preferred selectors are matched, the required selector is not considered. -This is useful for things like smoke testing of new game servers.

+

AbleToScale indicates that we can access the target fleet

-selectors
+scalingLimited
- -[]GameServerSelector - +bool
-

Ordered list of GameServer label selectors. -If the first selector is not matched, the selection attempts the second selector, and so on. -This is useful for things like smoke testing of new game servers. -Note: This field can only be set if neither Required or Preferred is set.

+

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

+

FleetAutoscalerSync +

+

+(Appears on: +FleetAutoscalerSpec) +

+

+

FleetAutoscalerSync describes when to sync a fleet

+

+ + + + + + + + +
FieldDescription
-scheduling
+type
-agones.dev/agones/pkg/apis.SchedulingStrategy + +FleetAutoscalerSyncType +
-

Scheduling strategy. Defaults to “Packed”.

+

Type of autoscaling sync.

-metadata
+fixedInterval
- -MetaPatch + +FixedIntervalSync
-

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

+(Optional) +

FixedInterval config params. Present only if FleetAutoscalerSyncType = FixedInterval.

+

FleetAutoscalerSyncType +(string alias)

+

+(Appears on: +FleetAutoscalerSync) +

+

+

FleetAutoscalerSyncType is the sync strategy for a given Fleet

+

+

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

+

+ + + + + + + + + + + + + + +
FieldDescription
+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.

-status
+service
- -GameServerAllocationStatus + +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.

-

GameServerAllocationSpec -

+
+

multicluster.agones.dev/v1

-(Appears on: -GameServerAllocation) +

Package v1 is the v1 version of the API.

+Resource Types: + +

GameServerAllocationPolicy +

-

GameServerAllocationSpec is the spec for a GameServerAllocation

+

GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API

@@ -5684,111 +5792,93 @@

GameServerAllocationS

+ + + + - +
+
+
-multiClusterSetting
- - -MultiClusterSetting - - +apiVersion
+string
+ +multicluster.agones.dev/v1 +
-

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

+kind
+string
GameServerAllocationPolicy
-required
+metadata
- -GameServerSelector + +Kubernetes meta/v1.ObjectMeta
-

Deprecated: use field Selectors instead. If Selectors is set, this field is ignored. -Required is the GameServer selector from which to choose GameServers from. -Defaults to all GameServers.

+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-preferred
+spec
- -[]GameServerSelector + +GameServerAllocationPolicySpec
-

Deprecated: use field Selectors instead. If Selectors is set, this field is ignored. -Preferred is an ordered list of preferred GameServer selectors -that are optional to be fulfilled, but will be searched before the required selector. -If the first selector is not matched, the selection attempts the second selector, and so on. -If any of the preferred selectors are matched, the required selector is not considered. -This is useful for things like smoke testing of new game servers.

-
+ +
-selectors
+priority
- -[]GameServerSelector - +int32
-

Ordered list of GameServer label selectors. -If the first selector is not matched, the selection attempts the second selector, and so on. -This is useful for things like smoke testing of new game servers. -Note: This field can only be set if neither Required or Preferred is set.

-scheduling
+weight
-agones.dev/agones/pkg/apis.SchedulingStrategy +int
-

Scheduling strategy. Defaults to “Packed”.

-metadata
+connectionInfo
- -MetaPatch + +ClusterConnectionInfo
-

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 +

ClusterConnectionInfo

(Appears on: -GameServerAllocation) +GameServerAllocationPolicySpec)

-

GameServerAllocationStatus is the status for an GameServerAllocation resource

+

ClusterConnectionInfo defines the connection information for a cluster

@@ -5800,82 +5890,67 @@

GameServerAllocatio

- - - -
-state
- - -GameServerAllocationState - - -
-

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

-
-gameServerName
+clusterName
string
+

Optional: the name of the targeted cluster

-ports
+allocationEndpoints
- -[]GameServerStatusPort - +[]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

-address
+secretName
string
+

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

-nodeName
+namespace
string
+

The cluster namespace from which to allocate gameservers

-source
+serverCa
-string +[]byte
-

If the allocation is from a remote cluster, Source is the endpoint of the remote agones-allocator. -Otherwise, Source is “local”

+

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

-

GameServerSelector +

ConnectionInfoIterator

-(Appears on: -GameServerAllocationSpec) -

-

-

GameServerSelector contains all the filter options for selecting -a GameServer for allocation.

+

ConnectionInfoIterator an iterator on ClusterConnectionInfo

@@ -5887,101 +5962,58 @@

GameServerSelector

- - - - - -
-LabelSelector
- - -Kubernetes meta/v1.LabelSelector - - -
-

See: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

-
-gameServerState
+currPriority
- -GameServerState - +int
-(Optional) -

[Stage:Beta] -[FeatureFlag:StateAllocationFilter] -GameServerState specifies which State is the filter to be used when attempting to retrieve a GameServer -via Allocation. Defaults to “Ready”. The only other option is “Allocated”, which can be used in conjunction with -label/annotation/player selectors to retrieve an already Allocated GameServer.

+

currPriority Current priority index from the orderedPriorities

-players
+orderedPriorities
- -PlayerSelector - +[]int32
-(Optional) -

[Stage:Alpha] -[FeatureFlag:PlayerAllocationFilter] -Players provides a filter on minimum and maximum values for player capacity when retrieving a GameServer -through Allocation. Defaults to no limits.

+

orderedPriorities list of ordered priorities

-

MetaPatch -

-

-(Appears on: -GameServerAllocationSpec) -

-

-

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

-

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

priorityToCluster Map of priority to cluster-policies map

-annotations
+clusterBlackList
-map[string]string +map[string]bool
+

clusterBlackList the cluster blacklist for the clusters that has already returned

-

MultiClusterSetting +

GameServerAllocationPolicySpec

(Appears on: -GameServerAllocationSpec) +GameServerAllocationPolicy)

-

MultiClusterSetting specifies settings for multi-cluster allocation.

+

GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy

@@ -5993,50 +6025,19 @@

MultiClusterSetting

- - - - - -
-enabled
- -bool - -
-
-policySelector
+priority
- -Kubernetes meta/v1.LabelSelector - +int32
-

PlayerSelector -

-

-(Appears on: -GameServerSelector) -

-

-

PlayerSelector is the filter options for a GameServer based on player counts

-

- - - - - - - -
FieldDescription
-minAvailable
+weight
-int64 +int
@@ -6044,9 +6045,11 @@

PlayerSelector

-maxAvailable
+connectionInfo
-int64 + +ClusterConnectionInfo +