From 0fc353258cb9fa2e9636da0636548ef8d13eb48d Mon Sep 17 00:00:00 2001
From: Mark Mandel Packages:
Package v1 is the v1 version of the API.
-agones.dev/v1
+allocation.agones.dev/v1
-
Fleet is the data structure for a Fleet resource
+GameServerAllocation is the data structure for allocating against a set of
+GameServers, defined selectors
selectors
-agones.dev/v1
+allocation.agones.dev/v1
|
@@ -59,13 +56,13 @@ Fleet |
+GameServerAllocation |
||||||||||||
metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -79,8 +76,8 @@ Fleet
spec
-
-FleetSpec
+
+GameServerAllocationSpec
Fleet
status
-
-FleetStatus
+
+GameServerAllocationStatus
|
-
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.
+
CounterSelector is the filter options for a GameServer based on the count and/or available capacity. +0 for MaxCount or MaxAvailable means unlimited maximum. Default for all fields: 0
-apiVersion
-string |
-
-
-agones.dev/v1
-
+minCount
+
+int64
+
|
-|||||||||||||||||||||||||
-kind
-string
|
-GameServer |
|||||||||||||||||||||||||
-metadata
+maxCount
-
-Kubernetes meta/v1.ObjectMeta
-
+int64
|
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
|
|||||||||||||||||||||||||
-spec
+minAvailable
-
-GameServerSpec
-
+int64
|
- - -
GameServerAllocationSpec +++(Appears on: +GameServerAllocation) + ++ GameServerAllocationSpec is the spec for a GameServerAllocation + +
GameServerAllocationState
+(
+ |
Field | +Description | +
---|---|
+state
+
+
+GameServerAllocationState
|
+ GameServerState is the current state of an GameServerAllocation, e.g. Allocated, or UnAllocated |
-eviction
+gameServerName
-
-Eviction
-
+string
|
-(Optional)
- (Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. Defaults to “Never”. - |
-
status
+ports
-
-GameServerStatus
+
+[]GameServerStatusPort
-
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
-
+address
+
+string
+
|
-
-kind
-string
|
-GameServerSet |
-metadata
+nodeName
-
-Kubernetes meta/v1.ObjectMeta
-
+string
|
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
|
-spec
+source
-
-GameServerSetSpec
-
+string
|
- - + If the allocation is from a remote cluster, Source is the endpoint of the remote agones-allocator. +Otherwise, Source is “local” + |
+
+(Appears on: +GameServerAllocationSpec) +
++
GameServerSelector contains all the filter options for selecting +a GameServer for allocation.
+Field | +Description | +
---|---|
-replicas
+LabelSelector
-int32
+
+Kubernetes meta/v1.LabelSelector
+
|
- Replicas are the number of GameServers that should be in this set +
+(Members of See: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
-allocationOverflow
+gameServerState
-
-AllocationOverflow
+
+GameServerState
|
(Optional)
- [Stage: Alpha]
-[FeatureFlag:FleetAllocationOverflow]
-Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
-the desired replicas on the underlying [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. |
-scheduling
+players
-agones.dev/agones/pkg/apis.SchedulingStrategy
+
+PlayerSelector
+
|
- Scheduling strategy. Defaults to “Packed”. +(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. |
-template
+counters
-
-GameServerTemplateSpec
+
+map[string]agones.dev/agones/pkg/apis/allocation/v1.CounterSelector
|
- Template the GameServer template to apply for this GameServerSet - |
-
(Alpha, CountsAndLists feature flag) Counters provides filters on minimum and maximum values +for a Counter’s count and available capacity when retrieving a GameServer through Allocation. +Defaults to no limits.
status
+lists
-
-GameServerSetStatus
+
+map[string]agones.dev/agones/pkg/apis/allocation/v1.ListSelector
(Alpha, CountsAndLists feature flag) Lists provides filters on minimum and maximum values +for List capacity, and for the existence of a value in a List, when retrieving a GameServer +through Allocation. Defaults to no limits.
(Appears on: -FleetStatus, -GameServerSetStatus) +GameServerSelector)
-
AggregatedPlayerStatus stores total player tracking values
+ListSelector is the filter options for a GameServer based on List available capacity and/or the +existence of a value in a List. +0 for MaxAvailable means unlimited maximum. Default for integer fields: 0 +“” for ContainsValue means ignore field. Default for string field: “”
-count
+containsValue
+
+string
+
+ |
++ | +
+minAvailable
int64
@@ -535,7 +631,7 @@ AggregatedPlayerStatus | |
-capacity
+maxAvailable
int64
@@ -545,17 +641,14 @@ AggregatedPlayerStatus |
(Appears on: -FleetSpec, -GameServerSetSpec) +GameServerAllocationSpec)
-
AllocationOverflow specifies what labels and/or annotations to apply on Allocated GameServers
-if the desired number of the underlying GameServerSet
drops below the number of Allocated GameServers
-attached to it.
MetaPatch is the metadata used to patch the GameServer metadata on allocation
-(Optional)
- Labels to be applied to the |
-(Optional)
- Annotations to be applied to the |
(Appears on: -GameServerSpec, -GameServerStatus) +GameServerAllocationSpec)
-
CounterStatus stores the current counter values
+MultiClusterSetting specifies settings for multi-cluster allocation.
-count
+enabled
-int64
+bool
|
@@ -621,9 +709,11 @@ CounterStatus |
-capacity
+policySelector
-int64
+
+Kubernetes meta/v1.LabelSelector
+
|
@@ -631,15 +721,14 @@ CounterStatus |
(Appears on: -GameServerSpec, -GameServerStatus) +GameServerSelector)
-
Eviction specifies the eviction tolerance of the GameServer
+PlayerSelector is the filter options for a GameServer based on player counts
-safe
+minAvailable
-
-EvictionSafe
-
+int64
+
+ |
++ | +
+maxAvailable
+
+int64
|
- (Alpha, SafeToEvict feature flag) -Game server supports termination via SIGTERM: -- Always: Allow eviction for both Cluster Autoscaler and node drain for upgrades -- OnUpgrade: Allow eviction for upgrades alone -- Never (default): Pod should run to completion |
string
alias)-(Appears on: -Eviction) -
--
EvictionSafe specified whether the game server supports termination via SIGTERM
- -(Appears on: -Fleet) +GameServerAllocationSpec)
-
FleetSpec is the spec for a Fleet
+Priority is a sorting option for GameServers with Counters or Lists based on the count or +number of items in a List. +PriorityType: Sort by a “Counter” or a “List”. +Key: The name of the Counter or List. If not found on the GameServer, has no impact. +Order: Sort by “Ascending” or “Descending”. Default is “Descending” so bigger count is preferred. +“Ascending” would be smaller count is preferred.
-replicas
-
-int32
-
- |
-
- Replicas are the number of GameServers that should be in this set. Defaults to 0. - |
-
-allocationOverflow
-
-
-AllocationOverflow
-
-
- |
-
-(Optional)
- [Stage: Alpha]
-[FeatureFlag:FleetAllocationOverflow]
-Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
-the desired replicas on the underlying |
-
-strategy
+priorityType
-
-Kubernetes apps/v1.DeploymentStrategy
-
+string
|
- Deployment strategy |
-scheduling
+key
-agones.dev/agones/pkg/apis.SchedulingStrategy
+string
|
- Scheduling strategy. Defaults to “Packed”. |
-template
+order
-
-GameServerTemplateSpec
-
+string
|
- Template the GameServer template to apply for this Fleet |
-(Appears on: -Fleet, -FleetAutoscaleRequest) +
Package v1 is the v1 version of the API.
+Resource Types: + +-
FleetStatus is the status of a Fleet
+FleetAutoscaler is the data structure for a FleetAutoscaler resource
-replicas
+apiVersion
+string |
+
+
+autoscaling.agones.dev/v1
+
+ |
+||||||
+kind
+string
+ |
+FleetAutoscaler |
+||||||
+metadata
-int32
+
+Kubernetes meta/v1.ObjectMeta
+
|
- Replicas the total number of current GameServer replicas +Refer to the Kubernetes API documentation for the fields of the +metadata field.
|
||||||
-readyReplicas
+spec
-int32
+
+FleetAutoscalerSpec
+
+
+ |
+
+ + +
|
||||||
-players
+status
-
-AggregatedPlayerStatus
+
+FleetAutoscalerStatus
|
-(Optional)
- [Stage:Alpha] -[FeatureFlag:PlayerTracking] -Players are the current total player capacity and count for this Fleet |
(Appears on: -GameServerSpec) +FleetAutoscalerPolicy)
-
GameServerPort defines a set of Ports that -are to be exposed via the GameServer
+BufferPolicy controls the desired behavior of the buffer policy.
-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 |
-
-container
-
-string
-
- |
-
-(Optional)
- Container is the name of the container on which to open the port. Defaults to the game server container. - |
-
-containerPort
+maxReplicas
int32
|
- ContainerPort is the port that is being opened on the specified container’s process +MaxReplicas is the maximum amount of replicas that the fleet may have. +It must be bigger than both MinReplicas and BufferSize |
-hostPort
+minReplicas
int32
|
- HostPort the port exposed on the host for clients to connect to +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 |
-protocol
+bufferSize
-
-Kubernetes core/v1.Protocol
-
+k8s.io/apimachinery/pkg/util/intstr.IntOrString
|
- Protocol is the network protocol being used. Defaults to UDP. TCP and TCPUDP are other options. +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) |
(Appears on: -GameServerSet) +FleetAutoscalerSync)
-
GameServerSetSpec the specification for GameServerSet
+FixedIntervalSync controls the desired behavior of the fixed interval based sync.
-replicas
+seconds
int32
|
- Replicas are the number of GameServers that should be in this set - |
-
-allocationOverflow
-
-
-AllocationOverflow
-
-
- |
-
-(Optional)
- [Stage: Alpha]
-[FeatureFlag:FleetAllocationOverflow]
-Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
-the desired replicas on the underlying |
-
-scheduling
-
-agones.dev/agones/pkg/apis.SchedulingStrategy
-
- |
-
- Scheduling strategy. Defaults to “Packed”. - |
-
-template
-
-
-GameServerTemplateSpec
-
-
- |
-
- Template the GameServer template to apply for this GameServerSet +Seconds defines how often we run fleet autoscaling in seconds |
(Appears on: -GameServerSet) +FleetAutoscaleReview)
-
GameServerSetStatus is the status of a GameServerSet
+FleetAutoscaleRequest defines the request to webhook autoscaler endpoint
-replicas
-
-int32
-
- |
-
- Replicas is the total number of current GameServer replicas - |
-
-readyReplicas
-
-int32
-
- |
-
- ReadyReplicas is the number of Ready GameServer replicas - |
-
-reservedReplicas
+uid
-int32
+k8s.io/apimachinery/pkg/types.UID
|
- ReservedReplicas is the number of Reserved GameServer replicas +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. |
-allocatedReplicas
+name
-int32
+string
|
- AllocatedReplicas is the number of Allocated GameServer replicas +Name is the name of the Fleet being scaled |
-shutdownReplicas
+namespace
-int32
+string
|
- ShutdownReplicas is the number of Shutdown GameServers replicas +Namespace is the namespace associated with the request (if any). |
-players
+status
-
-AggregatedPlayerStatus
+
+FleetStatus
|
-(Optional)
- [Stage:Alpha] -[FeatureFlag:PlayerTracking] -Players is the current total player capacity and count for this GameServerSet +The Fleet’s status values |
(Appears on: -GameServer, -GameServerTemplateSpec) +FleetAutoscaleReview)
-
GameServerSpec is the spec for a GameServer resource
+FleetAutoscaleResponse defines the response of webhook autoscaler endpoint
-container
+uid
-string
+k8s.io/apimachinery/pkg/types.UID
|
- Container specifies which Pod container is the game server. Only required if there is more than one -container defined +UID is an identifier for the individual request/response. +This should be copied over from the corresponding FleetAutoscaleRequest. |
-ports
+scale
-
-[]GameServerPort
-
+bool
|
- Ports are the array of ports that can be exposed via the game server +Set to false if no scaling should occur to the Fleet |
-health
+replicas
-
-Health
-
+int32
|
- Health configures health checking +The targeted replica count |
+
FleetAutoscaleReview is passed to the webhook with a populated Request value, +and then returned with a populated Response.
+ +
-scheduling
-
-agones.dev/agones/pkg/apis.SchedulingStrategy
-
- |
-
- Scheduling strategy. Defaults to “Packed” - |
+Field | +Description |
---|---|---|---|
-sdkServer
+request
-
-SdkServer
+
+FleetAutoscaleRequest
|
- SdkServer specifies parameters for the Agones SDK Server sidecar container |
||
-template
+response
-
-Kubernetes core/v1.PodTemplateSpec
+
+FleetAutoscaleResponse
|
- Template describes the Pod that will be created for the GameServer |
+(Appears on: +FleetAutoscalerSpec) +
++
FleetAutoscalerPolicy describes how to scale a fleet
+ +
-players
-
-
-PlayersSpec
-
-
- |
-
-(Optional)
- (Alpha, PlayerTracking feature flag) Players provides the configuration for player tracking features. - |
+Field | +Description |
---|---|---|---|
-counters
+type
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
+
+FleetAutoscalerPolicyType
|
-(Optional)
- (Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. +Type of autoscaling policy. |
||
-lists
+buffer
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
+
+BufferPolicy
|
+(Optional)
+ Buffer policy config params. Present only if FleetAutoscalerPolicyType = Buffer. |
||
-eviction
+webhook
-
-Eviction
+
+WebhookPolicy
|
(Optional)
- (Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. Defaults to “Never”. +Webhook policy config params. Present only if FleetAutoscalerPolicyType = Webhook. |
string
alias)(Appears on: -GameServerSelector, -GameServerStatus) +FleetAutoscalerPolicy)
-
GameServerState is the state for the GameServer
+FleetAutoscalerPolicyType is the policy for autoscaling +for a given Fleet
-(Appears on: -GameServer) +FleetAutoscaler)
-
GameServerStatus is the status for a GameServer resource
+FleetAutoscalerSpec is the spec for a Fleet Scaler
-state
+fleetName
-
-GameServerState
-
+string
|
- GameServerState is the current state of a GameServer, e.g. Creating, Starting, Ready, etc |
-ports
+policy
-
-[]GameServerStatusPort
+
+FleetAutoscalerPolicy
|
+ Autoscaling policy |
-address
+sync
-string
-
- |
-- | -
-nodeName
-
-string
+
+FleetAutoscalerSync
+
|
+(Optional)
+ [Stage:Beta] +[FeatureFlag:CustomFasSyncInterval] +Sync defines when FleetAutoscalers runs autoscaling |
+(Appears on: +FleetAutoscaler) +
++
FleetAutoscalerStatus defines the current status of a FleetAutoscaler
+ +Field | +Description | +
---|---|
-reservedUntil
+currentReplicas
-
-Kubernetes meta/v1.Time
-
+int32
|
+ CurrentReplicas is the current number of gameserver replicas +of the fleet managed by this autoscaler, as last seen by the autoscaler |
-players
+desiredReplicas
-
-PlayerStatus
-
+int32
|
-(Optional)
- [Stage:Alpha] -[FeatureFlag:PlayerTracking] +DesiredReplicas is the desired number of gameserver replicas +of the fleet managed by this autoscaler, as last calculated by the autoscaler |
-counters
+lastScaleTime
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
+
+Kubernetes meta/v1.Time
|
(Optional)
- (Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. +lastScaleTime is the last time the FleetAutoscaler scaled the attached fleet, |
-lists
+ableToScale
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
-
+bool
|
-(Optional)
+ AbleToScale indicates that we can access the target fleet |
-eviction
+scalingLimited
-
-Eviction
-
+bool
|
-(Optional)
- (Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. +ScalingLimited indicates that the calculated scale would be above or below the range +defined by MinReplicas and MaxReplicas, and has thus been capped. |
(Appears on: -GameServerAllocationStatus, -GameServerStatus) +FleetAutoscalerSpec)
-
GameServerStatusPort shows the port that was allocated to a -GameServer.
+FleetAutoscalerSync describes when to sync a fleet
-name
+type
-string
+
+FleetAutoscalerSyncType
+
|
+ Type of autoscaling sync. |
-port
+fixedInterval
-int32
+
+FixedIntervalSync
+
|
+(Optional)
+ FixedInterval config params. Present only if FleetAutoscalerSyncType = FixedInterval. |
string
alias)+(Appears on: +FleetAutoscalerSync) +
++
FleetAutoscalerSyncType is the sync strategy for a given Fleet
+ +(Appears on: -FleetSpec, -GameServerSetSpec) +FleetAutoscalerPolicy)
-
GameServerTemplateSpec is a template for GameServers
+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
-metadata
+url
-
-Kubernetes meta/v1.ObjectMeta
-
+string
|
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
+(Optional)
+
The Please note that using 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-spec
+service
-
-GameServerSpec
+
+Kubernetes admissionregistration/v1.ServiceReference
|
- - -
+ multicluster.agones.dev/v1++ Package v1 is the v1 version of the API. + +Resource Types: + +GameServerAllocationPolicy +++ GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API + +
GameServerTemplateSpecHealth
+ |
+
-disabled
-
-bool
-
- |
-
- Disabled is whether health checking is disabled or not - |
-
-periodSeconds
+clusterName
-int32
+string
|
- PeriodSeconds is the number of seconds each health ping has to occur in +Optional: the name of the targeted cluster |
-failureThreshold
+allocationEndpoints
-int32
+[]string
|
- FailureThreshold how many failures in a row constitutes unhealthy +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 |
-initialDelaySeconds
+secretName
-int32
+string
|
- InitialDelaySeconds initial delay before checking health +The name of the secret that contains TLS client certificates to connect the allocator server in the targeted cluster |
-(Appears on: -GameServerSpec, -GameServerStatus) -
--
ListStatus stores the current list values
- -Field | -Description | -
---|---|
-capacity
+namespace
-int64
+string
|
+ The cluster namespace from which to allocate gameservers |
-values
+serverCa
-[]string
+[]byte
|
+ The PEM encoded server CA, used by the allocator client to authenticate the remote server. |
-(Appears on: -GameServerStatus) -
--
PlayerStatus stores the current player capacity values
+ConnectionInfoIterator an iterator on ClusterConnectionInfo
-count
+currPriority
-int64
+int
|
+ currPriority Current priority index from the orderedPriorities |
-capacity
+orderedPriorities
-int64
+[]int32
|
+ orderedPriorities list of ordered priorities |
-ids
+priorityToCluster
-[]string
+map[int32]map[string][]*agones.dev/agones/pkg/apis/multicluster/v1.GameServerAllocationPolicy
|
+ priorityToCluster Map of priority to cluster-policies map |
-(Appears on: -GameServerSpec) -
--
PlayersSpec tracks the initial player capacity
- -Field | -Description | -
---|---|
-initialCapacity
+clusterBlackList
-int64
+map[string]bool
|
+ clusterBlackList the cluster blacklist for the clusters that has already returned |
string
alias)-(Appears on: -GameServerPort) -
--
PortPolicy is the port policy for the GameServer
- -(Appears on: -GameServerSpec) +GameServerAllocationPolicy)
-
SdkServer specifies parameters for the Agones SDK Server sidecar container
+GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy
-logLevel
+priority
-
-SdkServerLogLevel
-
+int32
|
- LogLevel for SDK server (sidecar) logs. Defaults to “Info” |
-grpcPort
+weight
-int32
+int
|
- GRPCPort is the port on which the SDK Server binds the gRPC server to accept incoming connections |
-httpPort
+connectionInfo
-int32
+
+ClusterConnectionInfo
+
|
- HTTPPort is the port on which the SDK Server binds the HTTP gRPC gateway server to accept incoming connections |
string
alias)-(Appears on: -SdkServer) -
--
SdkServerLogLevel is the log level for SDK server (sidecar) logs
-
Package v1 is the v1 version of the API.
Resource Types: --
GameServerAllocation is the data structure for allocating against a set of
-GameServers, defined selectors
selectors
Fleet is the data structure for a Fleet resource
-allocation.agones.dev/v1
+agones.dev/v1
|
@@ -1900,13 +1865,13 @@ GameServerAllocation |
+Fleet |
|||||||||||
metadata
-
+
Kubernetes meta/v1.ObjectMeta
@@ -1920,8 +1885,8 @@ GameServerAllocation
spec
-
-GameServerAllocationSpec
+
+FleetSpec
GameServerAllocation
status
-
-GameServerAllocationStatus
+
+FleetStatus
|
-(Appears on: -GameServerAllocation) -
--
GameServerAllocationSpec is the spec for a GameServerAllocation
+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.
-multiClusterSetting
+apiVersion
+string |
+
+
+agones.dev/v1
+
+ |
+|||||||||||||||||||
+kind
+string
+ |
+GameServer |
+|||||||||||||||||||
+metadata
-
-MultiClusterSetting
+
+Kubernetes meta/v1.ObjectMeta
|
- MultiClusterPolicySelector if specified, multi-cluster policies are applied. -Otherwise, allocation will happen locally. +Refer to the Kubernetes API documentation for the fields of the +metadata field.
|
|||||||||||||||||||
-required
+spec
-
-GameServerSelector
+
+GameServerSpec
|
- 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. ++ +
|
+|||||||||||||||||||
+status
+
+
+GameServerStatus
|
- 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 |
string
alias)-(Appears on: -GameServerAllocationStatus) -
--
GameServerAllocationState is the Allocation state
- --(Appears on: -GameServerAllocation) -
--
GameServerAllocationStatus is the status for an GameServerAllocation resource
+GameServerSet is the data structure for a set of GameServers. +This matches philosophically with the relationship between +Deployments and ReplicaSets
-state
+apiVersion
+string |
+
+
+agones.dev/v1
+
+ |
+||||||||
+kind
+string
+ |
+GameServerSet |
+||||||||
+metadata
-
-GameServerAllocationState
+
+Kubernetes meta/v1.ObjectMeta
|
- GameServerState is the current state of an GameServerAllocation, e.g. Allocated, or UnAllocated +Refer to the Kubernetes API documentation for the fields of the +metadata field.
|
||||||||
-gameServerName
+spec
-string
+
+GameServerSetSpec
+
+
+ |
+
+ + +
|
||||||||
-source
+status
-string
+
+GameServerSetStatus
+
|
- If the allocation is from a remote cluster, Source is the endpoint of the remote agones-allocator. -Otherwise, Source is “local” |
(Appears on: -GameServerAllocationSpec) +FleetStatus, +GameServerSetStatus)
-
GameServerSelector contains all the filter options for selecting -a GameServer for allocation.
+AggregatedPlayerStatus stores total player tracking values
-LabelSelector
+count
-
-Kubernetes meta/v1.LabelSelector
-
+int64
|
+ | +
+capacity
+
+int64
+
+ |
++ | +
-(Members of LabelSelector
are embedded into this type.)
+(Appears on:
+FleetSpec,
+GameServerSetSpec)
See: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
++
AllocationOverflow specifies what labels and/or annotations to apply on Allocated GameServers
+if the desired number of the underlying GameServerSet
drops below the number of Allocated GameServers
+attached to it.
Field | +Description | +
---|---|
+labels
+
+map[string]string
+
+ |
+
+(Optional)
+ Labels to be applied to the |
-gameServerState
+annotations
-
-GameServerState
-
+map[string]string
|
(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. +Annotations to be applied to the |
+(Appears on: +GameServerSpec, +GameServerStatus) +
++
CounterStatus stores the current counter values
+ +Field | +Description | +
---|---|
-players
+count
-
-PlayerSelector
+int64
+
+ |
++ | +
+capacity
+
+int64
+
+ |
++ | +
+(Appears on: +GameServerSpec, +GameServerStatus) +
++
Eviction specifies the eviction tolerance of the GameServer
+ +Field | +Description | +
---|---|
+safe
+
+
+EvictionSafe
|
-(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. +(Alpha, SafeToEvict feature flag) +Game server supports termination via SIGTERM: +- Always: Allow eviction for both Cluster Autoscaler and node drain for upgrades +- OnUpgrade: Allow eviction for upgrades alone +- Never (default): Pod should run to completion |
string
alias)+(Appears on: +Eviction) +
++
EvictionSafe specified whether the game server supports termination via SIGTERM
+ +(Appears on: -GameServerAllocationSpec) +Fleet)
-
MetaPatch is the metadata used to patch the GameServer metadata on allocation
+FleetSpec is the spec for a Fleet
-labels
+replicas
-map[string]string
+int32
+
+ |
+
+ Replicas are the number of GameServers that should be in this set. Defaults to 0. + |
+
+allocationOverflow
+
+
+AllocationOverflow
+
+
+ |
+
+(Optional)
+ [Stage: Alpha]
+[FeatureFlag:FleetAllocationOverflow]
+Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
+the desired replicas on the underlying |
+
+strategy
+
+
+Kubernetes apps/v1.DeploymentStrategy
+
+
+ |
+
+ Deployment strategy + |
+
+scheduling
+
+agones.dev/agones/pkg/apis.SchedulingStrategy
|
+ Scheduling strategy. Defaults to “Packed”. |
-annotations
+template
-map[string]string
+
+GameServerTemplateSpec
+
|
+ Template the GameServer template to apply for this Fleet |
(Appears on: -GameServerAllocationSpec) +Fleet, +FleetAutoscaleRequest)
-
MultiClusterSetting specifies settings for multi-cluster allocation.
+FleetStatus is the status of a Fleet
-enabled
+replicas
-bool
+int32
|
+ Replicas the total number of current GameServer replicas |
-policySelector
+readyReplicas
-
-Kubernetes meta/v1.LabelSelector
-
+int32
|
+ ReadyReplicas are the number of Ready GameServer replicas |
-(Appears on: -GameServerSelector) -
--
PlayerSelector is the filter options for a GameServer based on player counts
- -Field | -Description | +
+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. + |
---|---|---|---|
-minAvailable
+allocatedReplicas
-int64
+int32
|
+ AllocatedReplicas are the number of Allocated GameServer replicas |
||
-maxAvailable
+players
-int64
+
+AggregatedPlayerStatus
+
|
+(Optional)
+ [Stage:Alpha] +[FeatureFlag:PlayerTracking] +Players are the current total player capacity and count for this Fleet |
-
Package v1 is the v1 version of the API.
+(Appears on: +GameServerSpec) -Resource Types: - --
FleetAutoscaler is the data structure for a FleetAutoscaler resource
+GameServerPort defines a set of Ports that +are to be exposed via the GameServer
-apiVersion
-string |
-
-
-autoscaling.agones.dev/v1
-
- |
-||||||
-kind
-string
- |
-FleetAutoscaler |
-||||||
-metadata
+name
-
-Kubernetes meta/v1.ObjectMeta
-
+string
|
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
+Name is the descriptive name of the port |
||||||
-spec
+portPolicy
-
-FleetAutoscalerSpec
+
+PortPolicy
|
- - -
HostPort the port exposed on the host for clients to connect to |
||||||
-status
+protocol
-
-FleetAutoscalerStatus
+
+Kubernetes core/v1.Protocol
|
+ Protocol is the network protocol being used. Defaults to UDP. TCP and TCPUDP are other options. |
(Appears on: -FleetAutoscalerPolicy) +GameServerSet)
-
BufferPolicy controls the desired behavior of the buffer policy.
+GameServerSetSpec the specification for GameServerSet
-maxReplicas
+replicas
int32
|
- MaxReplicas is the maximum amount of replicas that the fleet may have. -It must be bigger than both MinReplicas and BufferSize +Replicas are the number of GameServers that should be in this set |
-minReplicas
+allocationOverflow
-int32
+
+AllocationOverflow
+
|
- 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 +(Optional) +[Stage: Alpha]
+[FeatureFlag:FleetAllocationOverflow]
+Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
+the desired replicas on the underlying |
-bufferSize
+scheduling
-k8s.io/apimachinery/pkg/util/intstr.IntOrString
+agones.dev/agones/pkg/apis.SchedulingStrategy
|
- 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) +Scheduling strategy. Defaults to “Packed”. + |
+
+template
+
+
+GameServerTemplateSpec
+
+
+ |
+
+ Template the GameServer template to apply for this GameServerSet |
(Appears on: -FleetAutoscalerSync) +GameServerSet)
-
FixedIntervalSync controls the desired behavior of the fixed interval based sync.
+GameServerSetStatus is the status of a GameServerSet
-seconds
+replicas
int32
|
- Seconds defines how often we run fleet autoscaling in seconds +Replicas is the total number of current GameServer replicas |
-(Appears on: -FleetAutoscaleReview) -
--
FleetAutoscaleRequest defines the request to webhook autoscaler endpoint
- -Field | -Description | +
+readyReplicas
+
+int32
+
+ |
+
+ ReadyReplicas is the number of Ready GameServer replicas + |
---|---|---|---|
-uid
+reservedReplicas
-k8s.io/apimachinery/pkg/types.UID
+int32
|
- 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. +ReservedReplicas is the number of Reserved GameServer replicas |
||
-name
+allocatedReplicas
-string
+int32
|
- Name is the name of the Fleet being scaled +AllocatedReplicas is the number of Allocated GameServer replicas |
||
-namespace
+shutdownReplicas
-string
+int32
|
- Namespace is the namespace associated with the request (if any). +ShutdownReplicas is the number of Shutdown GameServers replicas |
||
-status
+players
-
-FleetStatus
+
+AggregatedPlayerStatus
|
- The Fleet’s status values +(Optional) +[Stage:Alpha] +[FeatureFlag:PlayerTracking] +Players is the current total player capacity and count for this GameServerSet |
(Appears on: -FleetAutoscaleReview) +GameServer, +GameServerTemplateSpec)
-
FleetAutoscaleResponse defines the response of webhook autoscaler endpoint
+GameServerSpec is the spec for a GameServer resource
-uid
+container
-k8s.io/apimachinery/pkg/types.UID
+string
|
- UID is an identifier for the individual request/response. -This should be copied over from the corresponding FleetAutoscaleRequest. +Container specifies which Pod container is the game server. Only required if there is more than one +container defined |
-scale
+ports
-bool
+
+[]GameServerPort
+
|
- Set to false if no scaling should occur to the Fleet +Ports are the array of ports that can be exposed via the game server |
-replicas
+health
-int32
+
+Health
+
|
- The targeted replica count +Health configures health checking |
-
FleetAutoscaleReview is passed to the webhook with a populated Request value, -and then returned with a populated Response.
- -Field | -Description | +
+scheduling
+
+agones.dev/agones/pkg/apis.SchedulingStrategy
+
+ |
+
+ Scheduling strategy. Defaults to “Packed” + |
---|---|---|---|
-request
+sdkServer
-
-FleetAutoscaleRequest
+
+SdkServer
|
+ SdkServer specifies parameters for the Agones SDK Server sidecar container |
||
-response
+template
-
-FleetAutoscaleResponse
+
+Kubernetes core/v1.PodTemplateSpec
|
+ Template describes the Pod that will be created for the GameServer |
-(Appears on: -FleetAutoscalerSpec) -
--
FleetAutoscalerPolicy describes how to scale a fleet
- -Field | -Description | +
+players
+
+
+PlayersSpec
+
+
+ |
+
+(Optional)
+ (Alpha, PlayerTracking feature flag) Players provides the configuration for player tracking features. + |
---|---|---|---|
-type
+counters
-
-FleetAutoscalerPolicyType
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
|
- Type of autoscaling policy. +(Optional) +(Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. |
||
-buffer
+lists
-
-BufferPolicy
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
|
-(Optional)
- Buffer policy config params. Present only if FleetAutoscalerPolicyType = Buffer. |
||
-webhook
+eviction
-
-WebhookPolicy
+
+Eviction
|
(Optional)
- Webhook policy config params. Present only if FleetAutoscalerPolicyType = Webhook. +(Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. Defaults to “Never”. |
string
alias)(Appears on: -FleetAutoscalerPolicy) +GameServerSelector, +GameServerStatus)
-
FleetAutoscalerPolicyType is the policy for autoscaling -for a given Fleet
+GameServerState is the state for the GameServer
-(Appears on: -FleetAutoscaler) +GameServer)
-
FleetAutoscalerSpec is the spec for a Fleet Scaler
+GameServerStatus is the status for a GameServer resource
-fleetName
+state
-string
+
+GameServerState
+
|
+ GameServerState is the current state of a GameServer, e.g. Creating, Starting, Ready, etc |
-policy
+ports
-
-FleetAutoscalerPolicy
+
+[]GameServerStatusPort
|
- Autoscaling policy |
-sync
+address
-
-FleetAutoscalerSync
-
+string
|
-(Optional)
- [Stage:Beta] -[FeatureFlag:CustomFasSyncInterval] -Sync defines when FleetAutoscalers runs autoscaling |
-(Appears on: -FleetAutoscaler) -
--
FleetAutoscalerStatus defines the current status of a FleetAutoscaler
- -Field | -Description | +
+nodeName
+
+string
+
+ |
++ |
---|---|---|---|
-currentReplicas
+reservedUntil
-int32
+
+Kubernetes meta/v1.Time
+
|
- CurrentReplicas is the current number of gameserver replicas -of the fleet managed by this autoscaler, as last seen by the autoscaler |
||
-desiredReplicas
+players
-int32
+
+PlayerStatus
+
|
- DesiredReplicas is the desired number of gameserver replicas -of the fleet managed by this autoscaler, as last calculated by the autoscaler +(Optional) +[Stage:Alpha] +[FeatureFlag:PlayerTracking] |
||
-lastScaleTime
+counters
-
-Kubernetes meta/v1.Time
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
|
(Optional)
- lastScaleTime is the last time the FleetAutoscaler scaled the attached fleet, +(Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. |
||
-ableToScale
+lists
-bool
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
+
|
- AbleToScale indicates that we can access the target fleet +(Optional) |
||
-scalingLimited
+eviction
-bool
+
+Eviction
+
|
- ScalingLimited indicates that the calculated scale would be above or below the range -defined by MinReplicas and MaxReplicas, and has thus been capped. +(Optional) +(Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. |
(Appears on: -FleetAutoscalerSpec) +GameServerAllocationStatus, +GameServerStatus)
-
FleetAutoscalerSync describes when to sync a fleet
+GameServerStatusPort shows the port that was allocated to a +GameServer.
-type
+name
-
-FleetAutoscalerSyncType
-
+string
|
- Type of autoscaling sync. |
-fixedInterval
+port
-
-FixedIntervalSync
-
+int32
|
-(Optional)
- FixedInterval config params. Present only if FleetAutoscalerSyncType = FixedInterval. |
string
alias)-(Appears on: -FleetAutoscalerSync) -
--
FleetAutoscalerSyncType is the sync strategy for a given Fleet
- -(Appears on: -FleetAutoscalerPolicy) +FleetSpec, +GameServerSetSpec)
-
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
+GameServerTemplateSpec is a template for GameServers
-url
+metadata
-string
+
+Kubernetes meta/v1.ObjectMeta
+
|
-(Optional)
-
The Please note that using 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. +Refer to the Kubernetes API documentation for the fields of the +metadata field.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-service
+spec
-
-Kubernetes admissionregistration/v1.ServiceReference
+
+GameServerSpec
|
-(Optional)
-
If the webhook is running within the cluster, then you should use + +
- multicluster.agones.dev/v1-- Package v1 is the v1 version of the API. - -Resource Types: - -GameServerAllocationPolicy --- GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API - -
ClusterConnectionInfo
+ |
-clusterName
+disabled
-string
+bool
|
- Optional: the name of the targeted cluster +Disabled is whether health checking is disabled or not |
-allocationEndpoints
+periodSeconds
-[]string
+int32
|
- 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 +PeriodSeconds is the number of seconds each health ping has to occur in |
-secretName
+failureThreshold
-string
+int32
|
- The name of the secret that contains TLS client certificates to connect the allocator server in the targeted cluster +FailureThreshold how many failures in a row constitutes unhealthy |
-namespace
+initialDelaySeconds
+
+int32
+
+ |
+
+ InitialDelaySeconds initial delay before checking health + |
+
+(Appears on: +GameServerSpec, +GameServerStatus) +
++
ListStatus stores the current list values
+ +Field | +Description | +
---|---|
+capacity
-string
+int64
|
- The cluster namespace from which to allocate gameservers |
-serverCa
+values
-[]byte
+[]string
|
- The PEM encoded server CA, used by the allocator client to authenticate the remote server. |
-
ConnectionInfoIterator an iterator on ClusterConnectionInfo
+(Appears on: +GameServerStatus) + ++
PlayerStatus stores the current player capacity values
-currPriority
+count
-int
+int64
|
- currPriority Current priority index from the orderedPriorities |
-orderedPriorities
+capacity
-[]int32
+int64
|
- orderedPriorities list of ordered priorities |
-priorityToCluster
+ids
-map[int32]map[string][]*agones.dev/agones/pkg/apis/multicluster/v1.GameServerAllocationPolicy
+[]string
|
- priorityToCluster Map of priority to cluster-policies map |
+(Appears on: +GameServerSpec) +
++
PlayersSpec tracks the initial player capacity
+ +Field | +Description | +
---|---|
-clusterBlackList
+initialCapacity
-map[string]bool
+int64
|
- clusterBlackList the cluster blacklist for the clusters that has already returned |
string
alias)+(Appears on: +GameServerPort) +
++
PortPolicy is the port policy for the GameServer
+ +(Appears on: -GameServerAllocationPolicy) +GameServerSpec)
-
GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy
+SdkServer specifies parameters for the Agones SDK Server sidecar container
-priority
+logLevel
-int32
+
+SdkServerLogLevel
+
|
+ LogLevel for SDK server (sidecar) logs. Defaults to “Info” |
-weight
+grpcPort
-int
+int32
|
+ GRPCPort is the port on which the SDK Server binds the gRPC server to accept incoming connections |
-connectionInfo
+httpPort
-
-ClusterConnectionInfo
-
+int32
|
+ HTTPPort is the port on which the SDK Server binds the HTTP gRPC gateway server to accept incoming connections |
string
alias)+(Appears on: +SdkServer) +
++
SdkServerLogLevel is the log level for SDK server (sidecar) logs
+
Generated with gen-crd-api-reference-docs
.
Packages:
Package v1 is the v1 version of the API.
Resource Types: --
GameServerAllocation is the data structure for allocating against a set of
-GameServers, defined selectors
selectors
Fleet is the data structure for a Fleet resource
-allocation.agones.dev/v1
+agones.dev/v1
|
@@ -3494,7 +3729,7 @@ GameServerAllocation |
+Fleet |
|||||||||||||
@@ -3514,8 +3749,8 @@ GameServerAllocation
spec
-
-GameServerAllocationSpec
+
+FleetSpec
|
-|||||||||||||||
-status
-
-
-GameServerAllocationStatus
-
-
- |
-
+ [Stage: Alpha]
+[FeatureFlag:FleetAllocationOverflow]
+Labels and/or Annotations to apply to overflowing GameServers when the number of Allocated GameServers is more
+than the desired replicas on the underlying |
-
-(Appears on: -GameServerSelector) -
--
CounterSelector is the filter options for a GameServer based on the count and/or available capacity. -0 for MaxCount or MaxAvailable means unlimited maximum. Default for all fields: 0
- -Field | -Description | -
---|---|
-minCount
+strategy
-int64
+
+Kubernetes apps/v1.DeploymentStrategy
+
|
+ Deployment strategy |
-maxCount
+scheduling
-int64
+agones.dev/agones/pkg/apis.SchedulingStrategy
|
+ Scheduling strategy. Defaults to “Packed”. |
-minAvailable
+template
-int64
+
+GameServerTemplateSpec
+
|
+ Template the GameServer template to apply for this Fleet + |
+
maxAvailable
+status
-int64
+
+FleetStatus
+
-(Appears on: -GameServerAllocation) -
--
GameServerAllocationSpec is the spec for a GameServerAllocation
+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.
-multiClusterSetting
-
-
-MultiClusterSetting
-
-
+apiVersion
+string |
+
+
+agones.dev/v1
+
|
+|||||||||||||||||||||
- MultiClusterPolicySelector if specified, multi-cluster policies are applied. -Otherwise, allocation will happen locally. +kind
+string
|
+GameServer |
|||||||||||||||||||||
-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
+
+GameServerSpec
|
- 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 + +
GameServerAllocationState
-(
- |
Field | -Description | -
---|---|
-state
+template
-
-GameServerAllocationState
+
+Kubernetes core/v1.PodTemplateSpec
|
- GameServerState is the current state of an GameServerAllocation, e.g. Allocated, or UnAllocated +Template describes the Pod that will be created for the GameServer |
-gameServerName
+players
-string
+
+PlayersSpec
+
|
+(Optional)
+ (Alpha, PlayerTracking feature flag) Players provides the configuration for player tracking features. |
-ports
+counters
-
-[]GameServerStatusPort
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
|
+(Optional)
+ (Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. |
-address
+lists
-string
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
+
|
@@ -3902,37 +4018,41 @@ GameServerAllocatio |
-nodeName
+eviction
-string
+
+Eviction
+
|
+(Optional)
+ (Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. Defaults to “Never”. + |
+
source
+status
-string
+
+GameServerStatus
+
If the allocation is from a remote cluster, Source is the endpoint of the remote agones-allocator. -Otherwise, Source is “local”
-(Appears on: -GameServerAllocationSpec) -
--
GameServerSelector contains all the filter options for selecting -a GameServer for allocation.
+GameServerSet is the data structure for a set of GameServers. +This matches philosophically with the relationship between +Deployments and ReplicaSets
-LabelSelector
+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
+
+
+ |
+
+ + +
|
||||||||
-lists
+status
-
-map[string]agones.dev/agones/pkg/apis/allocation/v1.ListSelector
+
+GameServerSetStatus
|
-(Optional)
- (Alpha, CountsAndLists feature flag) Lists provides filters on minimum and maximum values -for List capacity, and for the existence of a value in a List, when retrieving a GameServer -through Allocation. Defaults to no limits. |
(Appears on: -GameServerSelector) +FleetStatus, +GameServerSetStatus)
-
ListSelector is the filter options for a GameServer based on List available capacity and/or the -existence of a value in a List. -0 for MaxAvailable means unlimited maximum. Default for integer fields: 0 -“” for ContainsValue means ignore field. Default for string field: “”
+AggregatedPlayerStatus stores total player tracking values
-containsValue
-
-string
-
- |
-- | -
-minAvailable
+count
int64
@@ -4069,7 +4205,7 @@ ListSelector | |
-maxAvailable
+capacity
int64
@@ -4079,14 +4215,17 @@ ListSelector |
(Appears on: -GameServerAllocationSpec) +FleetSpec, +GameServerSetSpec)
-
MetaPatch is the metadata used to patch the GameServer metadata on allocation
+AllocationOverflow specifies what labels and/or annotations to apply on Allocated GameServers
+if the desired number of the underlying GameServerSet
drops below the number of Allocated GameServers
+attached to it.
+(Optional)
+ Labels to be applied to the |
+(Optional)
+ Annotations to be applied to the |
(Appears on: -GameServerAllocationSpec) +GameServerSpec, +GameServerStatus)
-
MultiClusterSetting specifies settings for multi-cluster allocation.
+CounterStatus stores the current counter values
-enabled
+count
-bool
+int64
|
@@ -4147,26 +4291,70 @@ MultiClusterSetting |
-policySelector
+capacity
-
-Kubernetes meta/v1.LabelSelector
+int64
+
+ |
++ | +
+(Appears on: +GameServerSpec, +GameServerStatus) +
++
Eviction specifies the eviction tolerance of the GameServer
+ +Field | +Description | +
---|---|
+safe
+
+
+EvictionSafe
|
+ (Alpha, SafeToEvict feature flag) +Game server supports termination via SIGTERM: +- Always: Allow eviction for both Cluster Autoscaler and node drain for upgrades +- OnUpgrade: Allow eviction for upgrades alone +- Never (default): Pod should run to completion |
string
alias)+(Appears on: +Eviction) +
++
EvictionSafe specified whether the game server supports termination via SIGTERM
+ +(Appears on: -GameServerSelector) +Fleet)
-
PlayerSelector is the filter options for a GameServer based on player counts
+FleetSpec is the spec for a Fleet
-minAvailable
+replicas
-int64
+int32
|
+ Replicas are the number of GameServers that should be in this set. Defaults to 0. |
-maxAvailable
+allocationOverflow
-int64
+
+AllocationOverflow
+
+
+ |
+
+(Optional)
+ [Stage: Alpha]
+[FeatureFlag:FleetAllocationOverflow]
+Labels and/or Annotations to apply to overflowing GameServers when the number of Allocated GameServers is more
+than the desired replicas on the underlying |
+
+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 |
(Appears on: -GameServerAllocationSpec) +Fleet, +FleetAutoscaleRequest)
-
Priority is a sorting option for GameServers with Counters or Lists based on the count or -number of items in a List. -PriorityType: Sort by a “Counter” or a “List”. -Key: The name of the Counter or List. If not found on the GameServer, has no impact. -Order: Sort by “Ascending” or “Descending”. Default is “Descending” so bigger count is preferred. -“Ascending” would be smaller count is preferred.
+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 + |
+
-priorityType
+reservedReplicas
-string
+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. |
-key
+allocatedReplicas
-string
+int32
|
+ AllocatedReplicas are the number of Allocated GameServer replicas |
-order
+players
-string
+
+AggregatedPlayerStatus
+
|
+(Optional)
+ [Stage:Alpha] +[FeatureFlag:PlayerTracking] +Players are the current total player capacity and count for this Fleet |
-
Package v1 is the v1 version of the API.
+(Appears on: +GameServerSpec) -Resource Types: - --
FleetAutoscaler is the data structure for a FleetAutoscaler resource
+GameServerPort defines a set of Ports that +are to be exposed via the GameServer
-apiVersion
-string |
-
-
-autoscaling.agones.dev/v1
-
- |
-||||||
-kind
-string
- |
-FleetAutoscaler |
-||||||
-metadata
+name
-
-Kubernetes meta/v1.ObjectMeta
-
+string
|
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
+Name is the descriptive name of the port |
||||||
-spec
+portPolicy
-
-FleetAutoscalerSpec
+
+PortPolicy
|
- - -
HostPort the port exposed on the host for clients to connect to |
||||||
-status
+protocol
-
-FleetAutoscalerStatus
+
+Kubernetes core/v1.Protocol
|
+ Protocol is the network protocol being used. Defaults to UDP. TCP and TCPUDP are other options. |
(Appears on: -FleetAutoscalerPolicy) +GameServerSet)
-
BufferPolicy controls the desired behavior of the buffer policy.
+GameServerSetSpec the specification for GameServerSet
-maxReplicas
+replicas
int32
|
- MaxReplicas is the maximum amount of replicas that the fleet may have. -It must be bigger than both MinReplicas and BufferSize +Replicas are the number of GameServers that should be in this set |
-minReplicas
+allocationOverflow
-int32
+
+AllocationOverflow
+
|
- 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 +(Optional) +[Stage: Alpha]
+[FeatureFlag:FleetAllocationOverflow]
+Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
+the desired replicas on the underlying |
-bufferSize
+scheduling
-k8s.io/apimachinery/pkg/util/intstr.IntOrString
+agones.dev/agones/pkg/apis.SchedulingStrategy
|
- 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) +Scheduling strategy. Defaults to “Packed”. + |
+
+template
+
+
+GameServerTemplateSpec
+
+
+ |
+
+ Template the GameServer template to apply for this GameServerSet |
(Appears on: -FleetAutoscalerSync) +GameServerSet)
-
FixedIntervalSync controls the desired behavior of the fixed interval based sync.
+GameServerSetStatus is the status of a GameServerSet
-seconds
+replicas
int32
|
- Seconds defines how often we run fleet autoscaling in seconds +Replicas is the total number of current GameServer replicas |
-(Appears on: -FleetAutoscaleReview) -
--
FleetAutoscaleRequest defines the request to webhook autoscaler endpoint
- -Field | -Description | +
+readyReplicas
+
+int32
+
+ |
+
+ ReadyReplicas is the number of Ready GameServer replicas + |
---|---|---|---|
-uid
+reservedReplicas
-k8s.io/apimachinery/pkg/types.UID
+int32
|
- 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. +ReservedReplicas is the number of Reserved GameServer replicas |
||
-name
+allocatedReplicas
-string
+int32
|
- Name is the name of the Fleet being scaled +AllocatedReplicas is the number of Allocated GameServer replicas |
||
-namespace
+shutdownReplicas
-string
+int32
|
- Namespace is the namespace associated with the request (if any). +ShutdownReplicas is the number of Shutdown GameServers replicas |
||
-status
+players
-
-FleetStatus
+
+AggregatedPlayerStatus
|
- The Fleet’s status values +(Optional) +[Stage:Alpha] +[FeatureFlag:PlayerTracking] +Players is the current total player capacity and count for this GameServerSet |
(Appears on: -FleetAutoscaleReview) +GameServer, +GameServerTemplateSpec)
-
FleetAutoscaleResponse defines the response of webhook autoscaler endpoint
+GameServerSpec is the spec for a GameServer resource
-uid
+container
+
+string
+
+ |
+
+ Container specifies which Pod container is the game server. Only required if there is more than one +container defined + |
+
+ports
-k8s.io/apimachinery/pkg/types.UID
+
+[]GameServerPort
+
|
- UID is an identifier for the individual request/response. -This should be copied over from the corresponding FleetAutoscaleRequest. +Ports are the array of ports that can be exposed via the game server |
-scale
+health
-bool
+
+Health
+
|
- Set to false if no scaling should occur to the Fleet +Health configures health checking |
-replicas
+scheduling
-int32
+agones.dev/agones/pkg/apis.SchedulingStrategy
|
- The targeted replica count +Scheduling strategy. Defaults to “Packed” |
-
FleetAutoscaleReview is passed to the webhook with a populated Request value, -and then returned with a populated Response.
- -Field | -Description | -
---|---|
-request
+sdkServer
-
-FleetAutoscaleRequest
+
+SdkServer
|
+ SdkServer specifies parameters for the Agones SDK Server sidecar container |
-response
+template
-
-FleetAutoscaleResponse
+
+Kubernetes core/v1.PodTemplateSpec
|
+ Template describes the Pod that will be created for the GameServer |
-(Appears on: -FleetAutoscalerSpec) -
--
FleetAutoscalerPolicy describes how to scale a fleet
- -Field | -Description | +
+players
+
+
+PlayersSpec
+
+
+ |
+
+(Optional)
+ (Alpha, PlayerTracking feature flag) Players provides the configuration for player tracking features. + |
---|---|---|---|
-type
+counters
-
-FleetAutoscalerPolicyType
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
|
- Type of autoscaling policy. +(Optional) +(Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. |
||
-buffer
+lists
-
-BufferPolicy
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
|
-(Optional)
- Buffer policy config params. Present only if FleetAutoscalerPolicyType = Buffer. |
||
-webhook
+eviction
-
-WebhookPolicy
+
+Eviction
|
(Optional)
- Webhook policy config params. Present only if FleetAutoscalerPolicyType = Webhook. +(Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. Defaults to “Never”. |
string
alias)(Appears on: -FleetAutoscalerPolicy) +GameServerSelector, +GameServerStatus)
-
FleetAutoscalerPolicyType is the policy for autoscaling -for a given Fleet
+GameServerState is the state for the GameServer
-(Appears on: -FleetAutoscaler) +GameServer)
-
FleetAutoscalerSpec is the spec for a Fleet Scaler
+GameServerStatus is the status for a GameServer resource
-fleetName
+state
-string
+
+GameServerState
+
|
+ GameServerState is the current state of a GameServer, e.g. Creating, Starting, Ready, etc |
-policy
+ports
-
-FleetAutoscalerPolicy
+
+[]GameServerStatusPort
|
- Autoscaling policy |
-sync
+address
-
-FleetAutoscalerSync
-
+string
|
-(Optional)
- [Stage:Beta] -[FeatureFlag:CustomFasSyncInterval] -Sync defines when FleetAutoscalers runs autoscaling |
-(Appears on: -FleetAutoscaler) -
--
FleetAutoscalerStatus defines the current status of a FleetAutoscaler
- -Field | -Description | +
+nodeName
+
+string
+
+ |
++ |
---|---|---|---|
-currentReplicas
+reservedUntil
-int32
+
+Kubernetes meta/v1.Time
+
|
- CurrentReplicas is the current number of gameserver replicas -of the fleet managed by this autoscaler, as last seen by the autoscaler |
||
-desiredReplicas
+players
-int32
+
+PlayerStatus
+
|
- DesiredReplicas is the desired number of gameserver replicas -of the fleet managed by this autoscaler, as last calculated by the autoscaler +(Optional) +[Stage:Alpha] +[FeatureFlag:PlayerTracking] |
||
-lastScaleTime
+counters
-
-Kubernetes meta/v1.Time
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
|
(Optional)
- lastScaleTime is the last time the FleetAutoscaler scaled the attached fleet, +(Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. |
||
-ableToScale
+lists
-bool
+
+map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
+
|
- AbleToScale indicates that we can access the target fleet +(Optional) |
||
-scalingLimited
+eviction
-bool
+
+Eviction
+
|
- ScalingLimited indicates that the calculated scale would be above or below the range -defined by MinReplicas and MaxReplicas, and has thus been capped. +(Optional) +(Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. |
(Appears on: -FleetAutoscalerSpec) +GameServerAllocationStatus, +GameServerStatus)
-
FleetAutoscalerSync describes when to sync a fleet
+GameServerStatusPort shows the port that was allocated to a +GameServer.
-type
+name
-
-FleetAutoscalerSyncType
-
+string
|
- Type of autoscaling sync. |
-fixedInterval
-
-
-FixedIntervalSync
-
-
- |
-
-(Optional)
- FixedInterval config params. Present only if FleetAutoscalerSyncType = FixedInterval. - |
-
string
alias)-(Appears on: -FleetAutoscalerSync) -
--
FleetAutoscalerSyncType is the sync strategy for a given Fleet
- -port
+
+int32
+
+(Appears on: -FleetAutoscalerPolicy) +FleetSpec, +GameServerSetSpec)
-
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
+GameServerTemplateSpec is a template for GameServers
-url
+metadata
-string
+
+Kubernetes meta/v1.ObjectMeta
+
|
-(Optional)
-
The Please note that using 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. +Refer to the Kubernetes API documentation for the fields of the +metadata field.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-service
+spec
-
-Kubernetes admissionregistration/v1.ServiceReference
+
+GameServerSpec
|
-(Optional)
-
If the webhook is running within the cluster, then you should use + +
- multicluster.agones.dev/v1-- Package v1 is the v1 version of the API. - -Resource Types: - -GameServerAllocationPolicy --- GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API - -
ClusterConnectionInfo
+ |
-clusterName
+disabled
-string
+bool
|
- Optional: the name of the targeted cluster +Disabled is whether health checking is disabled or not |
-allocationEndpoints
+periodSeconds
-[]string
+int32
|
- 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 +PeriodSeconds is the number of seconds each health ping has to occur in |
-secretName
+failureThreshold
-string
+int32
|
- The name of the secret that contains TLS client certificates to connect the allocator server in the targeted cluster +FailureThreshold how many failures in a row constitutes unhealthy |
-namespace
+initialDelaySeconds
-string
+int32
+
+ |
+
+ InitialDelaySeconds initial delay before checking health + |
+
+(Appears on: +GameServerSpec, +GameServerStatus) +
++
ListStatus stores the current list values
+ +Field | +Description | +
---|---|
+capacity
+
+int64
|
- The cluster namespace from which to allocate gameservers |
-serverCa
+values
-[]byte
+[]string
|
- The PEM encoded server CA, used by the allocator client to authenticate the remote server. |
-
ConnectionInfoIterator an iterator on ClusterConnectionInfo
+(Appears on: +GameServerStatus) + ++
PlayerStatus stores the current player capacity values
-currPriority
+count
-int
+int64
|
- currPriority Current priority index from the orderedPriorities |
-orderedPriorities
+capacity
-[]int32
+int64
|
- orderedPriorities list of ordered priorities |
-priorityToCluster
+ids
-map[int32]map[string][]*agones.dev/agones/pkg/apis/multicluster/v1.GameServerAllocationPolicy
+[]string
|
- priorityToCluster Map of priority to cluster-policies map |
+(Appears on: +GameServerSpec) +
++
PlayersSpec tracks the initial player capacity
+ +Field | +Description | +
---|---|
-clusterBlackList
+initialCapacity
-map[string]bool
+int64
|
- clusterBlackList the cluster blacklist for the clusters that has already returned |
string
alias)+(Appears on: +GameServerPort) +
++
PortPolicy is the port policy for the GameServer
+ +(Appears on: -GameServerAllocationPolicy) +GameServerSpec)
-
GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy
+SdkServer specifies parameters for the Agones SDK Server sidecar container
-priority
+logLevel
-int32
+
+SdkServerLogLevel
+
|
+ LogLevel for SDK server (sidecar) logs. Defaults to “Info” |
-weight
+grpcPort
-int
+int32
|
+ GRPCPort is the port on which the SDK Server binds the gRPC server to accept incoming connections |
-connectionInfo
+httpPort
-
-ClusterConnectionInfo
-
+int32
|
+ HTTPPort is the port on which the SDK Server binds the HTTP gRPC gateway server to accept incoming connections |
string
alias)+(Appears on: +SdkServer) +
++
SdkServerLogLevel is the log level for SDK server (sidecar) logs
+
Package v1 is the v1 version of the API.
Resource Types: --
Fleet is the data structure for a Fleet resource
+GameServerAllocation is the data structure for allocating against a set of
+GameServers, defined selectors
selectors
-agones.dev/v1
+allocation.agones.dev/v1
|
@@ -5303,7 +5570,7 @@ Fleet |
+GameServerAllocation |
||||||||||||
@@ -5323,8 +5590,8 @@ Fleet
spec
-
-FleetSpec
+
+GameServerAllocationSpec
Fleet
status
-
-FleetStatus
+
+GameServerAllocationStatus
|
-
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.
+
CounterSelector is the filter options for a GameServer based on the count and/or available capacity. +0 for MaxCount or MaxAvailable means unlimited maximum. Default for all fields: 0
-apiVersion
-string |
+
-
-agones.dev/v1
-
|
|
-kind
-string
+maxCount
+
+int64
+
+ |
+- | GameServer |
-metadata
+minAvailable
-
-Kubernetes meta/v1.ObjectMeta
+int64
+
+ |
++ | +|
+maxAvailable
+
+int64
+
+ |
++ | +
+(Appears on: +GameServerAllocation) +
++
GameServerAllocationSpec is the spec for a GameServerAllocation
+ +Field | +Description | +|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+multiClusterSetting
+
+
+MultiClusterSetting
|
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
+MultiClusterPolicySelector if specified, multi-cluster policies are applied. +Otherwise, allocation will happen locally. |
|||||||||||||||||||||
-spec
+required
-
-GameServerSpec
+
+GameServerSelector
|
- - -
GameServerAllocationState
+(
+ |
Field | +Description | +
---|---|
-template
+state
-
-Kubernetes core/v1.PodTemplateSpec
+
+GameServerAllocationState
|
- Template describes the Pod that will be created for the GameServer +GameServerState is the current state of an GameServerAllocation, e.g. Allocated, or UnAllocated |
-players
+gameServerName
-
-PlayersSpec
-
+string
|
-(Optional)
- (Alpha, PlayerTracking feature flag) Players provides the configuration for player tracking features. |
-counters
+ports
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
+
+[]GameServerStatusPort
|
-(Optional)
- (Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. |
-lists
+address
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
-
+string
|
@@ -5592,41 +5978,37 @@ GameServer |
-eviction
+nodeName
-
-Eviction
-
+string
|
-(Optional)
- (Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. Defaults to “Never”. - |
-
status
+source
-
-GameServerStatus
-
+string
If the allocation is from a remote cluster, Source is the endpoint of the remote agones-allocator. +Otherwise, Source is “local”
-
GameServerSet is the data structure for a set of GameServers. -This matches philosophically with the relationship between -Deployments and ReplicaSets
+(Appears on: +GameServerAllocationSpec) + ++
GameServerSelector contains all the filter options for selecting +a GameServer for allocation.
-apiVersion
-string |
-
-
-agones.dev/v1
-
- |
-||||||||
-kind
-string
- |
-GameServerSet |
-||||||||
-metadata
+LabelSelector
-
-Kubernetes meta/v1.ObjectMeta
+
+Kubernetes meta/v1.LabelSelector
|
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
+
+(Members of See: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
||||||||
-spec
+gameServerState
-
-GameServerSetSpec
+
+GameServerState
|
- - -
(Alpha, CountsAndLists feature flag) Counters provides filters on minimum and maximum values +for a Counter’s count and available capacity when retrieving a GameServer through Allocation. +Defaults to no limits. |
||||||||
-status
+lists
-
-GameServerSetStatus
+
+map[string]agones.dev/agones/pkg/apis/allocation/v1.ListSelector
|
+(Optional)
+ (Alpha, CountsAndLists feature flag) Lists provides filters on minimum and maximum values +for List capacity, and for the existence of a value in a List, when retrieving a GameServer +through Allocation. Defaults to no limits. |
(Appears on: -FleetStatus, -GameServerSetStatus) +GameServerSelector)
-
AggregatedPlayerStatus stores total player tracking values
+ListSelector is the filter options for a GameServer based on List available capacity and/or the +existence of a value in a List. +0 for MaxAvailable means unlimited maximum. Default for integer fields: 0 +“” for ContainsValue means ignore field. Default for string field: “”
-count
+containsValue
+
+string
+
+ |
++ | +
+minAvailable
int64
@@ -5779,7 +6145,7 @@ AggregatedPlayerStatus | |
-capacity
+maxAvailable
int64
@@ -5789,17 +6155,14 @@ AggregatedPlayerStatus |
(Appears on: -FleetSpec, -GameServerSetSpec) +GameServerAllocationSpec)
-
AllocationOverflow specifies what labels and/or annotations to apply on Allocated GameServers
-if the desired number of the underlying GameServerSet
drops below the number of Allocated GameServers
-attached to it.
MetaPatch is the metadata used to patch the GameServer metadata on allocation
-(Optional)
- Labels to be applied to the |
-(Optional)
- Annotations to be applied to the |
(Appears on: -GameServerSpec, -GameServerStatus) +GameServerAllocationSpec)
-
CounterStatus stores the current counter values
+MultiClusterSetting specifies settings for multi-cluster allocation.
-count
+enabled
-int64
+bool
|
@@ -5865,9 +6223,11 @@ CounterStatus |
-capacity
+policySelector
-int64
+
+Kubernetes meta/v1.LabelSelector
+
|
@@ -5875,15 +6235,14 @@ CounterStatus |
(Appears on: -GameServerSpec, -GameServerStatus) +GameServerSelector)
-
Eviction specifies the eviction tolerance of the GameServer
+PlayerSelector is the filter options for a GameServer based on player counts
-safe
+minAvailable
-
-EvictionSafe
-
+int64
+
+ |
++ | +
+maxAvailable
+
+int64
|
- (Alpha, SafeToEvict feature flag) -Game server supports termination via SIGTERM: -- Always: Allow eviction for both Cluster Autoscaler and node drain for upgrades -- OnUpgrade: Allow eviction for upgrades alone -- Never (default): Pod should run to completion |
string
alias)-(Appears on: -Eviction) -
--
EvictionSafe specified whether the game server supports termination via SIGTERM
- -(Appears on: -Fleet) +GameServerAllocationSpec)
-
FleetSpec is the spec for a Fleet
+Priority is a sorting option for GameServers with Counters or Lists based on the count or +number of items in a List. +PriorityType: Sort by a “Counter” or a “List”. +Key: The name of the Counter or List. If not found on the GameServer, has no impact. +Order: Sort by “Ascending” or “Descending”. Default is “Descending” so bigger count is preferred. +“Ascending” would be smaller count is preferred.
-replicas
-
-int32
-
- |
-
- Replicas are the number of GameServers that should be in this set. Defaults to 0. - |
-
-allocationOverflow
-
-
-AllocationOverflow
-
-
- |
-
-(Optional)
- [Stage: Alpha]
-[FeatureFlag:FleetAllocationOverflow]
-Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
-the desired replicas on the underlying |
-
-strategy
+priorityType
-
-Kubernetes apps/v1.DeploymentStrategy
-
+string
|
- Deployment strategy |
-scheduling
+key
-agones.dev/agones/pkg/apis.SchedulingStrategy
+string
|
- Scheduling strategy. Defaults to “Packed”. |
-template
+order
-
-GameServerTemplateSpec
-
+string
|
- Template the GameServer template to apply for this Fleet |
-(Appears on: -Fleet, -FleetAutoscaleRequest) +
Package v1 is the v1 version of the API.
+Resource Types: + +-
FleetStatus is the status of a Fleet
+FleetAutoscaler is the data structure for a FleetAutoscaler resource
-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. +
+autoscaling.agones.dev/v1
+
|
|
-allocatedReplicas
-
-int32
-
- |
-
- AllocatedReplicas are the number of Allocated GameServer replicas +kind
+string
|
+FleetAutoscaler |
-players
+metadata
-
-AggregatedPlayerStatus
+
+Kubernetes meta/v1.ObjectMeta
|
-(Optional)
- [Stage:Alpha] -[FeatureFlag:PlayerTracking] -Players are the current total player capacity and count for this Fleet - |
-
-(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 +Refer to the Kubernetes API documentation for the fields of the +metadata field.
|
-portPolicy
+spec
-
-PortPolicy
+
+FleetAutoscalerSpec
|
- 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 |
-
-container
+fleetName
string
|
-(Optional)
- Container is the name of the container on which to open the port. Defaults to the game server container. |
-containerPort
+policy
-int32
+
+FleetAutoscalerPolicy
+
|
- ContainerPort is the port that is being opened on the specified container’s process +Autoscaling policy |
-hostPort
+sync
-int32
+
+FleetAutoscalerSync
+
|
- HostPort the port exposed on the host for clients to connect to +(Optional) +[Stage:Beta] +[FeatureFlag:CustomFasSyncInterval] +Sync defines when FleetAutoscalers runs autoscaling + |
+
protocol
+status
-
-Kubernetes core/v1.Protocol
+
+FleetAutoscalerStatus
Protocol is the network protocol being used. Defaults to UDP. TCP and TCPUDP are other options.
(Appears on: -GameServerSet) +FleetAutoscalerPolicy)
-
GameServerSetSpec the specification for GameServerSet
+BufferPolicy controls the desired behavior of the buffer policy.
-replicas
+maxReplicas
int32
|
- Replicas are the number of GameServers that should be in this set - |
-
-allocationOverflow
-
-
-AllocationOverflow
-
-
- |
-
-(Optional)
- [Stage: Alpha]
-[FeatureFlag:FleetAllocationOverflow]
-Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
-the desired replicas on the underlying MaxReplicas is the maximum amount of replicas that the fleet may have. +It must be bigger than both MinReplicas and BufferSize |
-scheduling
+minReplicas
-agones.dev/agones/pkg/apis.SchedulingStrategy
+int32
|
- Scheduling strategy. Defaults to “Packed”. +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 |
-template
+bufferSize
-
-GameServerTemplateSpec
-
+k8s.io/apimachinery/pkg/util/intstr.IntOrString
|
- Template the GameServer template to apply for this GameServerSet +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) |
(Appears on: -GameServerSet) +FleetAutoscalerSync)
-
GameServerSetStatus is the status of a GameServerSet
+FixedIntervalSync controls the desired behavior of the fixed interval based sync.
-replicas
+seconds
int32
|
- Replicas is the total number of current GameServer replicas +Seconds defines how often we run fleet autoscaling in seconds |
+(Appears on: +FleetAutoscaleReview) +
++
FleetAutoscaleRequest defines the request to webhook autoscaler endpoint
+ +
-readyReplicas
-
-int32
-
- |
-
- ReadyReplicas is the number of Ready GameServer replicas - |
+Field | +Description |
---|---|---|---|
-reservedReplicas
+uid
-int32
+k8s.io/apimachinery/pkg/types.UID
|
- ReservedReplicas is the number of Reserved GameServer replicas +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. |
||
-allocatedReplicas
+name
-int32
+string
|
- AllocatedReplicas is the number of Allocated GameServer replicas +Name is the name of the Fleet being scaled |
||
-shutdownReplicas
+namespace
-int32
+string
|
- ShutdownReplicas is the number of Shutdown GameServers replicas +Namespace is the namespace associated with the request (if any). |
||
-players
+status
-
-AggregatedPlayerStatus
+
+FleetStatus
|
-(Optional)
- [Stage:Alpha] -[FeatureFlag:PlayerTracking] -Players is the current total player capacity and count for this GameServerSet +The Fleet’s status values |
(Appears on: -GameServer, -GameServerTemplateSpec) +FleetAutoscaleReview)
-
GameServerSpec is the spec for a GameServer resource
+FleetAutoscaleResponse defines the response of webhook autoscaler endpoint
-container
+uid
-string
+k8s.io/apimachinery/pkg/types.UID
|
- Container specifies which Pod container is the game server. Only required if there is more than one -container defined +UID is an identifier for the individual request/response. +This should be copied over from the corresponding FleetAutoscaleRequest. |
-ports
+scale
-
-[]GameServerPort
-
+bool
|
- Ports are the array of ports that can be exposed via the game server +Set to false if no scaling should occur to the Fleet |
-health
+replicas
-
-Health
-
+int32
|
- Health configures health checking +The targeted replica count |
+
FleetAutoscaleReview is passed to the webhook with a populated Request value, +and then returned with a populated Response.
+ +
-scheduling
-
-agones.dev/agones/pkg/apis.SchedulingStrategy
-
- |
-
- Scheduling strategy. Defaults to “Packed” - |
+Field | +Description |
---|---|---|---|
-sdkServer
+request
-
-SdkServer
+
+FleetAutoscaleRequest
|
- SdkServer specifies parameters for the Agones SDK Server sidecar container |
||
-template
+response
-
-Kubernetes core/v1.PodTemplateSpec
+
+FleetAutoscaleResponse
|
- 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. - |
+
+(Appears on: +FleetAutoscalerSpec) +
++
FleetAutoscalerPolicy describes how to scale a fleet
+ +Field | +Description |
---|---|
-counters
+type
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
+
+FleetAutoscalerPolicyType
|
-(Optional)
- (Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. +Type of autoscaling policy. |
-lists
+buffer
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
+
+BufferPolicy
|
+(Optional)
+ Buffer policy config params. Present only if FleetAutoscalerPolicyType = Buffer. |
-eviction
+webhook
-
-Eviction
+
+WebhookPolicy
|
(Optional)
- (Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. Defaults to “Never”. +Webhook policy config params. Present only if FleetAutoscalerPolicyType = Webhook. |
string
alias)(Appears on: -GameServerSelector, -GameServerStatus) +FleetAutoscalerPolicy)
-
GameServerState is the state for the GameServer
+FleetAutoscalerPolicyType is the policy for autoscaling +for a given Fleet
-(Appears on: -GameServer) +FleetAutoscaler)
-
GameServerStatus is the status for a GameServer resource
+FleetAutoscalerSpec is the spec for a Fleet Scaler
-state
+fleetName
-
-GameServerState
-
+string
|
- GameServerState is the current state of a GameServer, e.g. Creating, Starting, Ready, etc |
-ports
+policy
-
-[]GameServerStatusPort
+
+FleetAutoscalerPolicy
|
+ Autoscaling policy |
-address
+sync
-string
+
+FleetAutoscalerSync
+
|
+(Optional)
+ [Stage:Beta] +[FeatureFlag:CustomFasSyncInterval] +Sync defines when FleetAutoscalers runs autoscaling |
+(Appears on: +FleetAutoscaler) +
++
FleetAutoscalerStatus defines the current status of a FleetAutoscaler
+ +
-nodeName
-
-string
-
- |
-- | +Field | +Description |
---|---|---|---|
-reservedUntil
+currentReplicas
-
-Kubernetes meta/v1.Time
-
+int32
|
+ CurrentReplicas is the current number of gameserver replicas +of the fleet managed by this autoscaler, as last seen by the autoscaler |
||
-players
+desiredReplicas
-
-PlayerStatus
-
+int32
|
-(Optional)
- [Stage:Alpha] -[FeatureFlag:PlayerTracking] +DesiredReplicas is the desired number of gameserver replicas +of the fleet managed by this autoscaler, as last calculated by the autoscaler |
||
-counters
+lastScaleTime
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.CounterStatus
+
+Kubernetes meta/v1.Time
|
(Optional)
- (Alpha, CountsAndLists feature flag) Counters and Lists provides the configuration for generic tracking features. +lastScaleTime is the last time the FleetAutoscaler scaled the attached fleet, |
||
-lists
+ableToScale
-
-map[string]agones.dev/agones/pkg/apis/agones/v1.ListStatus
-
+bool
|
-(Optional)
+ AbleToScale indicates that we can access the target fleet |
||
-eviction
+scalingLimited
-
-Eviction
-
+bool
|
-(Optional)
- (Alpha, SafeToEvict feature flag) Eviction specifies the eviction tolerance of the GameServer. +ScalingLimited indicates that the calculated scale would be above or below the range +defined by MinReplicas and MaxReplicas, and has thus been capped. |
(Appears on: -GameServerAllocationStatus, -GameServerStatus) +FleetAutoscalerSpec)
-
GameServerStatusPort shows the port that was allocated to a -GameServer.
+FleetAutoscalerSync describes when to sync a fleet
-name
+type
-string
+
+FleetAutoscalerSyncType
+
|
+ Type of autoscaling sync. |
-port
+fixedInterval
-int32
+
+FixedIntervalSync
+
|
+(Optional)
+ FixedInterval config params. Present only if FleetAutoscalerSyncType = FixedInterval. |
string
alias)+(Appears on: +FleetAutoscalerSync) +
++
FleetAutoscalerSyncType is the sync strategy for a given Fleet
+ +(Appears on: -FleetSpec, -GameServerSetSpec) +FleetAutoscalerPolicy)
-
GameServerTemplateSpec is a template for GameServers
+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
-metadata
-
-
-Kubernetes meta/v1.ObjectMeta
-
-
- |
-
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
- |
-||||||||||||||||||||||||||||||||||||||||||||||||||||||
-spec
-
-
-GameServerSpec
-
-
- |
-
- - -
+ multicluster.agones.dev/v1++ Package v1 is the v1 version of the API. + +Resource Types: + +GameServerAllocationPolicy +++ GameServerAllocationPolicy is the Schema for the gameserverallocationpolicies API + +
GameServerTemplateSpecHealth
+ |
-disabled
-
-bool
-
- |
-
- Disabled is whether health checking is disabled or not - |
-
-periodSeconds
+clusterName
-int32
+string
|
- PeriodSeconds is the number of seconds each health ping has to occur in +Optional: the name of the targeted cluster |
-failureThreshold
+allocationEndpoints
-int32
+[]string
|
- FailureThreshold how many failures in a row constitutes unhealthy +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 |
-initialDelaySeconds
+secretName
-int32
+string
|
- InitialDelaySeconds initial delay before checking health +The name of the secret that contains TLS client certificates to connect the allocator server in the targeted cluster |
-(Appears on: -GameServerSpec, -GameServerStatus) -
--
ListStatus stores the current list values
- -Field | -Description | -
---|---|
-capacity
+namespace
-int64
+string
|
+ The cluster namespace from which to allocate gameservers |
-values
+serverCa
-[]string
+[]byte
|
+ The PEM encoded server CA, used by the allocator client to authenticate the remote server. |
-(Appears on: -GameServerStatus) -
--
PlayerStatus stores the current player capacity values
+ConnectionInfoIterator an iterator on ClusterConnectionInfo
-count
+currPriority
-int64
+int
|
+ currPriority Current priority index from the orderedPriorities |
-capacity
+orderedPriorities
-int64
+[]int32
|
+ orderedPriorities list of ordered priorities |
-ids
+priorityToCluster
-[]string
+map[int32]map[string][]*agones.dev/agones/pkg/apis/multicluster/v1.GameServerAllocationPolicy
|
+ priorityToCluster Map of priority to cluster-policies map |
-(Appears on: -GameServerSpec) -
--
PlayersSpec tracks the initial player capacity
- -Field | -Description | -
---|---|
-initialCapacity
+clusterBlackList
-int64
+map[string]bool
|
+ clusterBlackList the cluster blacklist for the clusters that has already returned |
string
alias)-(Appears on: -GameServerPort) -
--
PortPolicy is the port policy for the GameServer
- -(Appears on: -GameServerSpec) +GameServerAllocationPolicy)
-
SdkServer specifies parameters for the Agones SDK Server sidecar container
+GameServerAllocationPolicySpec defines the desired state of GameServerAllocationPolicy
-logLevel
+priority
-
-SdkServerLogLevel
-
+int32
|
- LogLevel for SDK server (sidecar) logs. Defaults to “Info” |
-grpcPort
+weight
-int32
+int
|
- GRPCPort is the port on which the SDK Server binds the gRPC server to accept incoming connections |
-httpPort
+connectionInfo
-int32
+
+ClusterConnectionInfo
+
|
- HTTPPort is the port on which the SDK Server binds the HTTP gRPC gateway server to accept incoming connections |
string
alias)-(Appears on: -SdkServer) -
--
SdkServerLogLevel is the log level for SDK server (sidecar) logs
-
Generated with gen-crd-api-reference-docs
.
diff --git a/site/content/en/docs/Reference/fleet.md b/site/content/en/docs/Reference/fleet.md
index 4297c6c0b9..852b773cb6 100644
--- a/site/content/en/docs/Reference/fleet.md
+++ b/site/content/en/docs/Reference/fleet.md
@@ -43,6 +43,16 @@ spec:
maxSurge: 25%
# the amount to decrements GameServers by. Defaults to 25%
maxUnavailable: 25%
+ # [Stage:Alpha]
+ # [FeatureFlag:FleetAllocationOverflow]
+ # Labels and/or Annotations to apply to overflowing GameServers when the number of Allocated GameServers is more
+ # than the desired replicas on the underlying `GameServerSet`
+ allocationOverflow:
+ labels:
+ mykey: myvalue
+ version: "" # empty an existing label value
+ annotations:
+ otherkey: setthisvalue
template:
# GameServer metadata
metadata:
@@ -98,6 +108,11 @@ The `spec` field is the actual `Fleet` specification and it is composed as follo
- `rollingUpdate` is only relevant when `type: RollingUpdate`
- `maxSurge` is the amount to increment the new GameServers by. Defaults to 25%
- `maxUnavailable` is the amount to decrements GameServers by. Defaults to 25%
+- `allocationOverflow` (Alpha, requires `FleetAllocationOverflow` flag) The labels and/or Annotations to apply to
+ GameServers when the number of Allocated GameServers drops below the desired replicas on the underlying
+ `GameServerSet`.
+ - `labels` the map of labels to be applied
+ - `annotations` the map of annotations to be applied
- `template` a full `GameServer` configuration template.
See the [GameServer]({{< relref "gameserver.md" >}}) reference for all available fields.
diff --git a/test/e2e/fleet_test.go b/test/e2e/fleet_test.go
index dffe17ce32..f6ef287e88 100644
--- a/test/e2e/fleet_test.go
+++ b/test/e2e/fleet_test.go
@@ -1528,6 +1528,103 @@ func TestFleetAggregatedPlayerStatus(t *testing.T) {
})
}
+func TestFleetAllocationOverflow(t *testing.T) {
+ if !runtime.FeatureEnabled(runtime.FeatureFleetAllocateOverflow) {
+ t.SkipNow()
+ }
+ t.Parallel()
+ ctx := context.Background()
+ client := framework.AgonesClient.AgonesV1()
+ fleets := client.Fleets(framework.Namespace)
+
+ setup := func() *agonesv1.Fleet {
+ flt := defaultFleet(framework.Namespace)
+ flt.Spec.AllocationOverflow = &agonesv1.AllocationOverflow{Labels: map[string]string{"colour": "green"}, Annotations: map[string]string{"action": "update"}}
+ flt, err := fleets.Create(ctx, flt.DeepCopy(), metav1.CreateOptions{})
+ require.NoError(t, err)
+ framework.AssertFleetCondition(t, flt, e2e.FleetReadyCount(flt.Spec.Replicas))
+
+ // allocate two of them.
+ framework.CreateAndApplyAllocation(t, flt)
+ framework.CreateAndApplyAllocation(t, flt)
+ framework.AssertFleetCondition(t, flt, func(entry *logrus.Entry, fleet *agonesv1.Fleet) bool {
+ return fleet.Status.AllocatedReplicas == 2
+ })
+
+ flt, err = fleets.Get(ctx, flt.ObjectMeta.Name, metav1.GetOptions{})
+ require.NoError(t, err)
+ return flt
+ }
+
+ assertCount := func(t *testing.T, log *logrus.Entry, flt *agonesv1.Fleet, expected int) {
+ require.Eventuallyf(t, func() bool {
+ log.Info("Checking GameServers")
+ list, err := framework.ListGameServersFromFleet(flt)
+ require.NoError(t, err)
+ count := 0
+
+ for _, gs := range list {
+ if gs.ObjectMeta.Labels["colour"] != "green" {
+ log.WithField("gs", gs).Info("Label not set")
+ continue
+ }
+ if gs.ObjectMeta.Annotations["action"] != "update" {
+ log.WithField("gs", gs).Info("Annotation not set")
+ continue
+ }
+ count++
+ }
+
+ return count == expected
+ }, 5*time.Minute, time.Second, "Labels and annotations not set")
+ }
+
+ t.Run("scale down", func(t *testing.T) {
+ log := e2e.TestLogger(t)
+ flt := setup()
+ defer fleets.Delete(ctx, flt.ObjectMeta.Name, metav1.DeleteOptions{}) // nolint: errcheck
+
+ framework.ScaleFleet(t, log, flt, 0)
+
+ // wait for scale down
+ framework.AssertFleetCondition(t, flt, func(entry *logrus.Entry, fleet *agonesv1.Fleet) bool {
+ return fleet.Status.AllocatedReplicas == 2 && fleet.Status.ReadyReplicas == 0
+ })
+
+ assertCount(t, log, flt, 2)
+ })
+
+ t.Run("rolling update", func(t *testing.T) {
+ log := e2e.TestLogger(t)
+ flt := setup()
+ defer fleets.Delete(ctx, flt.ObjectMeta.Name, metav1.DeleteOptions{}) // nolint: errcheck
+
+ fltCopy := flt.DeepCopy()
+ if fltCopy.Spec.Template.ObjectMeta.Labels == nil {
+ fltCopy.Spec.Template.ObjectMeta.Labels = map[string]string{}
+ }
+ fltCopy.Spec.Template.ObjectMeta.Labels["version"] = "2.0"
+ flt, err := fleets.Update(ctx, fltCopy, metav1.UpdateOptions{})
+ require.NoError(t, err)
+
+ // wait for rolling update to finish
+ require.Eventuallyf(t, func() bool {
+ list, err := framework.ListGameServersFromFleet(flt)
+ assert.NoError(t, err)
+ for _, gs := range list {
+ log.WithField("gs", gs).Info("checking game server")
+ if gs.Status.State == agonesv1.GameServerStateReady && gs.ObjectMeta.Labels["version"] == "2.0" {
+ return true
+ }
+ }
+
+ return false
+ }, 5*time.Minute, time.Second, "Rolling update did not complete")
+
+ assertCount(t, log, flt, 1)
+ })
+}
+
func assertCausesContainsString(t *testing.T, causes []metav1.StatusCause, expected string) {
found := false
for _, v := range causes {
diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go
index 424962aed9..58225458f7 100644
--- a/test/e2e/framework/framework.go
+++ b/test/e2e/framework/framework.go
@@ -315,6 +315,30 @@ func (f *Framework) CycleAllocations(ctx context.Context, t *testing.T, flt *ago
}
}
+// ScaleFleet will scale a Fleet with retries to a specified replica size.
+func (f *Framework) ScaleFleet(t *testing.T, log *logrus.Entry, flt *agonesv1.Fleet, replicas int32) {
+ fleets := f.AgonesClient.AgonesV1().Fleets(f.Namespace)
+ ctx := context.Background()
+
+ require.Eventuallyf(t, func() bool {
+ flt, err := fleets.Get(ctx, flt.ObjectMeta.Name, metav1.GetOptions{})
+ if err != nil {
+ log.WithError(err).Info("Could not get Fleet")
+ return false
+ }
+
+ fltCopy := flt.DeepCopy()
+ fltCopy.Spec.Replicas = replicas
+ _, err = fleets.Update(ctx, fltCopy, metav1.UpdateOptions{})
+ if err != nil {
+ log.WithError(err).Info("Could not scale Fleet")
+ return false
+ }
+
+ return true
+ }, 5*time.Minute, time.Second, "Could not scale Fleet %s", flt.ObjectMeta.Name)
+}
+
// AssertFleetCondition waits for the Fleet to be in a specific condition or fails the test if the condition can't be met in 5 minutes.
func (f *Framework) AssertFleetCondition(t *testing.T, flt *agonesv1.Fleet, condition func(*logrus.Entry, *agonesv1.Fleet) bool) {
err := f.WaitForFleetCondition(t, flt, condition)