From 3b2365a0f017476478e6bf3c6d142b7a5c5c6ce5 Mon Sep 17 00:00:00 2001 From: Alexander Apalikov Date: Wed, 21 Aug 2019 15:00:33 +0300 Subject: [PATCH] Add Sidecar log level through GS specification Add ability to specify logrus log level in yaml configuration and apply this log level on creating the GameServer. --- examples/fleet.yaml | 3 + examples/gameserver.yaml | 9 +- .../crds/_gameserverspecvalidation.yaml | 15 + install/yaml/install.yaml | 45 + pkg/apis/agones/v1/gameserver.go | 20 +- pkg/apis/agones/v1/gameserver_test.go | 53 +- pkg/sdkserver/sdkserver.go | 23 +- .../Reference/agones_crd_api_reference.html | 1834 ++++++++--------- site/content/en/docs/Reference/fleet.md | 5 + site/content/en/docs/Reference/gameserver.md | 18 +- 10 files changed, 1024 insertions(+), 1001 deletions(-) diff --git a/examples/fleet.yaml b/examples/fleet.yaml index 2ea0828203..99a73a5c0c 100644 --- a/examples/fleet.yaml +++ b/examples/fleet.yaml @@ -62,6 +62,9 @@ spec: health: initialDelaySeconds: 30 periodSeconds: 60 + # logging parameters for game server sidecar + logging: + sdkServer: Info # The GameServer's Pod template template: spec: diff --git a/examples/gameserver.yaml b/examples/gameserver.yaml index 9dcc17049e..4676bb6f86 100644 --- a/examples/gameserver.yaml +++ b/examples/gameserver.yaml @@ -35,7 +35,7 @@ spec: ports: # name is a descriptive name for the port - name: default - # portPolicy has two options: + # portPolicy has three options: # - "Dynamic" (default) the system allocates a free hostPort for the gameserver, for game clients to connect to # - "Static", user defines the hostPort that the game client will connect to. Then onus is on the user to ensure that the # - "Passthrough" dynamically sets the `containerPort` to the same value as the dynamically selected hostPort. @@ -60,6 +60,13 @@ spec: # Minimum consecutive failures for the health probe to be considered failed after having succeeded. # Defaults to 3. Minimum value is 1 failureThreshold: 3 + # logging parameters for game server sidecar + logging: + # sdkServer logging parameter has three options: + # - "Info" (default) The SDK server will output all messages except for debug messages + # - "Debug" The SDK server will output all messages including debug messages + # - "Error" The SDK server will only output error messages + sdkServer: Info # Pod template configuration # https://v1-12.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#podtemplate-v1-core template: diff --git a/install/helm/agones/templates/crds/_gameserverspecvalidation.yaml b/install/helm/agones/templates/crds/_gameserverspecvalidation.yaml index 696a61f26b..18b0c7fc52 100644 --- a/install/helm/agones/templates/crds/_gameserverspecvalidation.yaml +++ b/install/helm/agones/templates/crds/_gameserverspecvalidation.yaml @@ -92,6 +92,21 @@ properties: type: integer minimum: 1 maximum: 65535 + logging: + type: object + title: Define logging levels for agones system components + properties: + sdkServer: + type: string + description: | + sdkServer logging parameter has three options: + - "Info" (default) The SDK server will output all messages except for debug messages + - "Debug" The SDK server will output all messages including debug messages + - "Error" The SDK server will only output error messages + enum: + - Error + - Info + - Debug scheduling: type: string enum: diff --git a/install/yaml/install.yaml b/install/yaml/install.yaml index b2aaffae55..601e2accd9 100644 --- a/install/yaml/install.yaml +++ b/install/yaml/install.yaml @@ -339,6 +339,21 @@ spec: type: integer minimum: 1 maximum: 65535 + logging: + type: object + title: Define logging levels for agones system components + properties: + sdkServer: + type: string + description: | + sdkServer logging parameter has three options: + - "Info" (default) The SDK server will output all messages except for debug messages + - "Debug" The SDK server will output all messages including debug messages + - "Error" The SDK server will only output error messages + enum: + - Error + - Info + - Debug scheduling: type: string enum: @@ -594,6 +609,21 @@ spec: type: integer minimum: 1 maximum: 65535 + logging: + type: object + title: Define logging levels for agones system components + properties: + sdkServer: + type: string + description: | + sdkServer logging parameter has three options: + - "Info" (default) The SDK server will output all messages except for debug messages + - "Debug" The SDK server will output all messages including debug messages + - "Error" The SDK server will only output error messages + enum: + - Error + - Info + - Debug scheduling: type: string enum: @@ -860,6 +890,21 @@ spec: type: integer minimum: 1 maximum: 65535 + logging: + type: object + title: Define logging levels for agones system components + properties: + sdkServer: + type: string + description: | + sdkServer logging parameter has three options: + - "Info" (default) The SDK server will output all messages except for debug messages + - "Debug" The SDK server will output all messages including debug messages + - "Error" The SDK server will only output error messages + enum: + - Error + - Info + - Debug scheduling: type: string enum: diff --git a/pkg/apis/agones/v1/gameserver.go b/pkg/apis/agones/v1/gameserver.go index 8e69cd7e25..95bd317aa8 100644 --- a/pkg/apis/agones/v1/gameserver.go +++ b/pkg/apis/agones/v1/gameserver.go @@ -133,12 +133,20 @@ type GameServerSpec struct { Ports []GameServerPort `json:"ports"` // Health configures health checking Health Health `json:"health,omitempty"` - // Scheduling strategy. Defaults to "Packed". + // Scheduling strategy. Defaults to "Packed" Scheduling apis.SchedulingStrategy `json:"scheduling,omitempty"` + // Logging specifies log levels for Agones system containers + Logging Logging `json:"logging,omitempty"` // Template describes the Pod that will be created for the GameServer Template corev1.PodTemplateSpec `json:"template"` } +// Logging specifies log levels for Agones system containers +type Logging struct { + // SdkServer is a log level for SDK server (sidecar) logs. Defaults to "Info" + SdkServer string `json:"sdkServer,omitempty"` +} + // GameServerState is the state for the GameServer type GameServerState string @@ -213,9 +221,17 @@ func (gss *GameServerSpec) ApplyDefaults() { gss.applyPortDefaults() gss.applyHealthDefaults() gss.applySchedulingDefaults() + gss.applyLogLevelDefaults() +} + +// applyLogLevelDefaults applies the log level default - "Info" +func (gss *GameServerSpec) applyLogLevelDefaults() { + if gss.Logging.SdkServer == "" { + gss.Logging.SdkServer = "Info" + } } -// applyContainerDefaults applues the container defaults +// applyContainerDefaults applies the container defaults func (gss *GameServerSpec) applyContainerDefaults() { if len(gss.Template.Spec.Containers) == 1 { gss.Container = gss.Template.Spec.Containers[0].Name diff --git a/pkg/apis/agones/v1/gameserver_test.go b/pkg/apis/agones/v1/gameserver_test.go index 01577efaf9..3f7905b8c0 100644 --- a/pkg/apis/agones/v1/gameserver_test.go +++ b/pkg/apis/agones/v1/gameserver_test.go @@ -61,11 +61,12 @@ func TestGameServerApplyDefaults(t *testing.T) { t.Parallel() type expected struct { - protocol corev1.Protocol - state GameServerState - policy PortPolicy - health Health - scheduling apis.SchedulingStrategy + protocol corev1.Protocol + state GameServerState + policy PortPolicy + health Health + scheduling apis.SchedulingStrategy + sdkServerLogLevel string } data := map[string]struct { gameServer GameServer @@ -93,6 +94,7 @@ func TestGameServerApplyDefaults(t *testing.T) { InitialDelaySeconds: 5, PeriodSeconds: 5, }, + sdkServerLogLevel: "Info", }, }, "defaults on passthrough": { @@ -116,6 +118,7 @@ func TestGameServerApplyDefaults(t *testing.T) { InitialDelaySeconds: 5, PeriodSeconds: 5, }, + sdkServerLogLevel: "Info", }, }, "defaults are already set": { @@ -138,6 +141,7 @@ func TestGameServerApplyDefaults(t *testing.T) { {Name: "testing", Image: "testing/image"}, {Name: "testing2", Image: "testing/image2"}}}, }, + Logging: Logging{SdkServer: "Info"}, }, Status: GameServerStatus{State: "TestState"}}, container: "testing2", @@ -152,6 +156,7 @@ func TestGameServerApplyDefaults(t *testing.T) { InitialDelaySeconds: 11, PeriodSeconds: 12, }, + sdkServerLogLevel: "Info", }, }, "set basic defaults on static gameserver": { @@ -173,6 +178,7 @@ func TestGameServerApplyDefaults(t *testing.T) { InitialDelaySeconds: 5, PeriodSeconds: 5, }, + sdkServerLogLevel: "Info", }, }, "health is disabled": { @@ -192,6 +198,7 @@ func TestGameServerApplyDefaults(t *testing.T) { health: Health{ Disabled: true, }, + sdkServerLogLevel: "Info", }, }, "convert from legacy single port to multiple": { @@ -211,11 +218,37 @@ func TestGameServerApplyDefaults(t *testing.T) { }, container: "testing", expected: expected{ - protocol: corev1.ProtocolTCP, - state: GameServerStateCreating, - policy: Static, + protocol: corev1.ProtocolTCP, + state: GameServerStateCreating, + policy: Static, + scheduling: apis.Packed, + health: Health{Disabled: true}, + sdkServerLogLevel: "Info", + }, + }, + "set Debug logging level": { + gameServer: GameServer{ + Spec: GameServerSpec{ + Ports: []GameServerPort{{ContainerPort: 999}}, + Logging: Logging{SdkServer: "Debug"}, + Template: corev1.PodTemplateSpec{ + Spec: corev1.PodSpec{Containers: []corev1.Container{ + {Name: "testing", Image: "testing/image"}, + }}}}, + }, + container: "testing", + expected: expected{ + protocol: "UDP", + state: GameServerStatePortAllocation, + policy: Dynamic, scheduling: apis.Packed, - health: Health{Disabled: true}, + health: Health{ + Disabled: false, + FailureThreshold: 3, + InitialDelaySeconds: 5, + PeriodSeconds: 5, + }, + sdkServerLogLevel: "Debug", }, }, } @@ -233,6 +266,7 @@ func TestGameServerApplyDefaults(t *testing.T) { assert.Equal(t, test.expected.state, test.gameServer.Status.State) assert.Equal(t, test.expected.health, test.gameServer.Spec.Health) assert.Equal(t, test.expected.scheduling, test.gameServer.Spec.Scheduling) + assert.Equal(t, test.expected.sdkServerLogLevel, test.gameServer.Spec.Logging.SdkServer) }) } } @@ -481,6 +515,7 @@ func TestGameServerPatch(t *testing.T) { assert.Contains(t, string(patch), `{"op":"replace","path":"/spec/container","value":"bear"}`) } + func TestGameServerGetDevAddress(t *testing.T) { devGs := &GameServer{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/sdkserver/sdkserver.go b/pkg/sdkserver/sdkserver.go index e4d528a535..b1b00547f3 100644 --- a/pkg/sdkserver/sdkserver.go +++ b/pkg/sdkserver/sdkserver.go @@ -165,7 +165,7 @@ func NewSDKServer(gameServerName, namespace string, kubeClient kubernetes.Interf logfields.GameServerKey, strings.Join([]string{agones.GroupName, s.namespace, s.gameServerName}, ".")) - s.logger.Info("created GameServer sidecar") + s.logger.Info("Created GameServer sidecar") return s, nil } @@ -191,9 +191,22 @@ func (s *SDKServer) Run(stop <-chan struct{}) error { return err } + logLevel := "info" // grab configuration details + if gs.Spec.Logging.SdkServer != "" { + logLevel = strings.ToLower(gs.Spec.Logging.SdkServer) + } + s.logger.WithField("logLevel", logLevel).Info("Setting LogLevel configuration") + level, err := logrus.ParseLevel(logLevel) + if err == nil { + s.logger.Logger.SetLevel(level) + } else { + s.logger.WithError(err).Info("Specified wrong Logging.SdkServer. Setting default loglevel - Info") + s.logger.Logger.SetLevel(logrus.InfoLevel) + } + s.health = gs.Spec.Health - s.logger.WithField("health", s.health).Info("setting health configuration") + s.logger.WithField("health", s.health).Info("Setting health configuration") s.healthTimeout = time.Duration(gs.Spec.Health.PeriodSeconds) * time.Second s.initHealthLastUpdated(time.Duration(gs.Spec.Health.InitialDelaySeconds) * time.Second) @@ -214,7 +227,7 @@ func (s *SDKServer) Run(stop <-chan struct{}) error { go func() { if err := s.server.ListenAndServe(); err != nil { if err == http.ErrServerClosed { - s.logger.WithError(err).Info("health check: http server closed") + s.logger.WithError(err).Info("Health check: http server closed") } else { err = errors.Wrap(err, "Could not listen on :8080") runtime.HandleError(s.logger.WithError(err), err) @@ -319,7 +332,7 @@ func (s *SDKServer) gameServer() (*agonesv1.GameServer, error) { // updateLabels updates the labels on this GameServer to the ones persisted in SDKServer, // i.e. SDKServer.gsLabels, with the prefix of "agones.dev/sdk-" func (s *SDKServer) updateLabels() error { - s.logger.WithField("labels", s.gsLabels).Info("updating label") + s.logger.WithField("labels", s.gsLabels).Info("Updating label") gs, err := s.gameServer() if err != nil { return err @@ -534,7 +547,7 @@ func (s *SDKServer) sendGameServerUpdate(gs *agonesv1.GameServer) { func (s *SDKServer) runHealth() { s.checkHealth() if !s.healthy() { - s.logger.WithField("gameServerName", s.gameServerName).Info("has failed health check") + s.logger.WithField("gameServerName", s.gameServerName).Info("GameServer has failed health check") s.enqueueState(agonesv1.GameServerStateUnhealthy) } } diff --git a/site/content/en/docs/Reference/agones_crd_api_reference.html b/site/content/en/docs/Reference/agones_crd_api_reference.html index 7eaf7a517a..d1417b04a9 100644 --- a/site/content/en/docs/Reference/agones_crd_api_reference.html +++ b/site/content/en/docs/Reference/agones_crd_api_reference.html @@ -3,32 +3,35 @@ description="Detailed list of Agones Custom Resource Definitions available" +++ -{{% feature expiryVersion="0.12.0" %}} +{{% feature expiryVersion="1.1.0" %}}

Packages:

-

allocation.agones.dev

+

agones.dev

-

Package v1alpha1 is the v1alpha1 version of the API.

+

Package v1 is the v1 version of the API.

Resource Types: -

GameServerAllocation +

Fleet

-

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

+

Fleet is the data structure for a Fleet resource

@@ -44,7 +47,7 @@

GameServerAllocation string

@@ -53,7 +56,7 @@

GameServerAllocation kind
string -

+ @@ -84,44 +87,26 @@

GameServerAllocation

-allocation.agones.dev/v1alpha1 +agones.dev/v1
GameServerAllocationFleet
@@ -73,8 +76,8 @@

GameServerAllocation

spec
- -GameServerAllocationSpec + +FleetSpec
- - - - @@ -137,16 +122,15 @@

GameServerAllocation

-multiClusterSetting
- - -MultiClusterSetting - - -
-

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

-
-required
+replicas
- -Kubernetes meta/v1.LabelSelector - +int32
-

Required The required allocation. Defaults to all GameServers.

+

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

-preferred
+strategy
- -[]Kubernetes meta/v1.LabelSelector + +Kubernetes apps/v1.DeploymentStrategy
-

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

+

Deployment strategy

-metadata
+template
- -MetaPatch + +GameServerTemplateSpec
-

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

+

Template the GameServer template to apply for this Fleet

@@ -156,8 +140,8 @@

GameServerAllocation status
- -GameServerAllocationStatus + +FleetStatus @@ -166,14 +150,14 @@

GameServerAllocation -

GameServerAllocationSpec +

GameServer

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

@@ -185,149 +169,120 @@

GameServerAllocationSpec

+ + + + - +
+
+
-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
- -Kubernetes meta/v1.LabelSelector + +Kubernetes meta/v1.ObjectMeta
-

Required The required allocation. Defaults to all GameServers.

+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-preferred
+spec
- -[]Kubernetes meta/v1.LabelSelector + +GameServerSpec
-

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

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

Scheduling strategy. Defaults to “Packed”.

+

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

-metadata
+ports
- -MetaPatch + +[]GameServerPort
-

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

+

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

-

GameServerAllocationState -(string alias)

-

-(Appears on: -GameServerAllocationStatus) -

-

-

GameServerAllocationState is the Allocation state

-

-

GameServerAllocationStatus -

-

-(Appears on: -GameServerAllocation) -

-

-

GameServerAllocationStatus is the status for an GameServerAllocation resource

-

- - - - - - - - - - -
FieldDescription
-state
+health
- -GameServerAllocationState + +Health
-

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

+

Health configures health checking

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

Scheduling strategy. Defaults to “Packed”.

-ports
+template
- -[]GameServerStatusPort + +Kubernetes core/v1.PodTemplateSpec
+

Template describes the Pod that will be created for the GameServer

-address
- -string - -
+
-nodeName
+status
-string + +GameServerStatus + @@ -335,14 +290,12 @@

GameServerAllocationStatus -

MetaPatch +

GameServerSet

-(Appears on: -GameServerAllocationSpec) -

-

-

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

+

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

@@ -354,154 +307,81 @@

MetaPatch

+ + + + - -
-labels
- -map[string]string - +apiVersion
+string
+ +agones.dev/v1 +
+kind
+string
GameServerSet
-annotations
+metadata
-map[string]string + +Kubernetes meta/v1.ObjectMeta +
+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-

MultiClusterSetting -

-

-(Appears on: -GameServerAllocationSpec) -

-

-

MultiClusterSetting specifies settings for multi-cluster allocation.

-

- - - - - - - - - - - - - - -
FieldDescription
-enabled
- -bool - -
-
-policySelector
+spec
- -Kubernetes meta/v1.LabelSelector + +GameServerSetSpec
-
-
-

autoscaling.agones.dev

-

-

Package v1 is the v1 version of the API.

-

-Resource Types: - -

FleetAutoscaler -

-

-

FleetAutoscaler is the data structure for a FleetAutoscaler resource

-

+
+
- - - - - - - - - - - - - - - - @@ -521,14 +401,14 @@

FleetAutoscaler

FieldDescription
-apiVersion
-string
- -autoscaling.agones.dev/v1 - -
-kind
-string -
FleetAutoscaler
-metadata
+replicas
- -Kubernetes meta/v1.ObjectMeta - +int32
-Refer to the Kubernetes API documentation for the fields of the -metadata field. +

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

-spec
- - -FleetAutoscalerSpec - - -
-
-
- - -
-fleetName
+scheduling
-string +agones.dev/agones/pkg/apis.SchedulingStrategy
+

Scheduling strategy. Defaults to “Packed”.

-policy
+template
- -FleetAutoscalerPolicy + +GameServerTemplateSpec
-

Autoscaling policy

+

Template the GameServer template to apply for this GameServerSet

@@ -511,8 +391,8 @@

FleetAutoscaler

status
- -FleetAutoscalerStatus + +GameServerSetStatus
-

BufferPolicy +

FleetSpec

(Appears on: -FleetAutoscalerPolicy) +Fleet)

-

BufferPolicy controls the desired behavior of the buffer policy.

+

FleetSpec is the spec for a Fleet

@@ -540,59 +420,63 @@

BufferPolicy

+ + + +
-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
+strategy
-int32 + +Kubernetes apps/v1.DeploymentStrategy +
-

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

+

Deployment strategy

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

-

FleetAutoscaleRequest +

FleetStatus

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

-

FleetAutoscaleRequest defines the request to webhook autoscaler endpoint

+

FleetStatus is the status of a Fleet

@@ -604,63 +488,60 @@

FleetAutoscaleRequest

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

+

Replicas the total number of current GameServer replicas

-name
+readyReplicas
-string +int32
-

Name is the name of the Fleet being scaled

+

ReadyReplicas are the number of Ready GameServer replicas

-namespace
+reservedReplicas
-string +int32
-

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

+

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.

-status
+allocatedReplicas
- -FleetStatus - +int32
-

The Fleet’s status values

+

AllocatedReplicas are the number of Allocated GameServer replicas

-

FleetAutoscaleResponse +

GameServerPort

(Appears on: -FleetAutoscaleReview) +GameServerSpec)

-

FleetAutoscaleResponse defines the response of webhook autoscaler endpoint

+

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

@@ -672,88 +553,77 @@

FleetAutoscaleResponse

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

+

Name is the descriptive name of the port

-scale
+portPolicy
-bool + +PortPolicy +
-

Set to false if no scaling should occur to the Fleet

+

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

-replicas
+containerPort
int32
-

The targeted replica count

+

ContainerPort is the port that is being opened on the game server process

-

FleetAutoscaleReview -

-

-

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

-

- - - - - - - -
FieldDescription
-request
+hostPort
- -FleetAutoscaleRequest - +int32
+

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

-response
+protocol
- -FleetAutoscaleResponse + +Kubernetes core/v1.Protocol
+

Protocol is the network protocol being used. Defaults to UDP. TCP is the only other option

-

FleetAutoscalerPolicy +

GameServerSetSpec

(Appears on: -FleetAutoscalerSpec) +GameServerSet)

-

FleetAutoscalerPolicy describes how to scale a fleet

+

GameServerSetSpec the specification for GameServerSet

@@ -765,107 +635,49 @@

FleetAutoscalerPolicy

- - - - - - - - - -
-type
+replicas
- -FleetAutoscalerPolicyType - - -
-

Type of autoscaling policy.

-
-buffer
- - -BufferPolicy - - -
-(Optional) -

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

-
-webhook
- - -WebhookPolicy - +int32
-(Optional) -

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

+

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

-

FleetAutoscalerPolicyType -(string alias)

-

-(Appears on: -FleetAutoscalerPolicy) -

-

-

FleetAutoscalerPolicyType is the policy for autoscaling -for a given Fleet

-

-

FleetAutoscalerSpec -

-

-(Appears on: -FleetAutoscaler) -

-

-

FleetAutoscalerSpec is the spec for a Fleet Scaler

-

- - - - - - - -
FieldDescription
-fleetName
+scheduling
-string +agones.dev/agones/pkg/apis.SchedulingStrategy
+

Scheduling strategy. Defaults to “Packed”.

-policy
+template
- -FleetAutoscalerPolicy + +GameServerTemplateSpec
-

Autoscaling policy

+

Template the GameServer template to apply for this GameServerSet

-

FleetAutoscalerStatus +

GameServerSetStatus

(Appears on: -FleetAutoscaler) +GameServerSet)

-

FleetAutoscalerStatus defines the current status of a FleetAutoscaler

+

GameServerSetStatus is the status of a GameServerSet

@@ -877,77 +689,70 @@

FleetAutoscalerStatus

-currentReplicas
+replicas
int32
-

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

+

Replicas the total number of current GameServer replicas

-desiredReplicas
+readyReplicas
int32
-

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

+

ReadyReplicas are the number of Ready GameServer replicas

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

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

+

ReservedReplicas are the number of Reserved GameServer replicas

-ableToScale
+allocatedReplicas
-bool +int32
-

AbleToScale indicates that we can access the target fleet

+

AllocatedReplicas are the number of Allocated GameServer replicas

-scalingLimited
+shutdownReplicas
-bool +int32
-

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

+

ShutdownReplicas are the number of Shutdown GameServers replicas

-

WebhookPolicy +

GameServerSpec

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

-

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

+

GameServerSpec is the spec for a GameServer resource

@@ -959,196 +764,145 @@

WebhookPolicy

- - -
-url
+container
string
-(Optional) -

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

-

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

-

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

-

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

-

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

-

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

+

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

-service
+ports
- -Kubernetes admissionregistration/v1beta1.ServiceReference + +[]GameServerPort
-(Optional) -

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

-

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

-

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

+

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

-caBundle
+health
-[]byte + +Health +
-

caBundle is a PEM encoded CA bundle which will be used to validate -the webhook’s server certificate. -Required.

-
-
-

stable.agones.dev

-

-

Package v1alpha1 is the v1alpha1 version of the API.

-

-Resource Types: - -

Fleet -

-

-

Fleet is the data structure for a Fleet resource

-

- - - - - - - - - - - - - - - + + +
FieldDescription
-apiVersion
-string
- -stable.agones.dev/v1alpha1 - -
-kind
-string +

Health configures health checking

Fleet
-metadata
+scheduling
- -Kubernetes meta/v1.ObjectMeta - +agones.dev/agones/pkg/apis.SchedulingStrategy
-Refer to the Kubernetes API documentation for the fields of the -metadata field. +

Scheduling strategy. Defaults to “Packed”.

-spec
+template
- -FleetSpec + +Kubernetes core/v1.PodTemplateSpec
-
-
+

Template describes the Pod that will be created for the GameServer

+
+

GameServerState +(string alias)

+

+(Appears on: +GameServerStatus) +

+

+

GameServerState is the state for the GameServer

+

+

GameServerStatus +

+

+(Appears on: +GameServer) +

+

+

GameServerStatus is the status for a GameServer resource

+

+ + + + + + + - -
FieldDescription
-replicas
+state
-int32 + +GameServerState +
-

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

+

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

-strategy
+ports
- -Kubernetes apps/v1.DeploymentStrategy + +[]GameServerStatusPort
-

Deployment strategy

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

Scheduling strategy. Defaults to “Packed”.

-template
+nodeName
- -GameServerTemplateSpec - +string
-

Template the GameServer template to apply for this Fleet

-
-status
+reservedUntil
- -FleetStatus + +Kubernetes meta/v1.Time @@ -1157,11 +911,16 @@

Fleet -

FleetAllocation +

GameServerStatusPort

-

FleetAllocation is the data structure for allocating against a Fleet -Deprecated: Please use GameServerAllocation instead.

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

+

+

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

@@ -1173,51 +932,7 @@

FleetAllocation

- - - - - - - - - - - - - - - -
-apiVersion
-string
- -stable.agones.dev/v1alpha1 - -
-kind
-string -
FleetAllocation
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -FleetAllocationSpec - - -
-
-
- - - - - -
-fleetName
+name
string @@ -1227,26 +942,9 @@

FleetAllocation

-metadata
- - -MetaPatch - - -
-
-
-status
+port
- -FleetAllocationStatus - +int32
@@ -1254,14 +952,15 @@

FleetAllocation

-

GameServer +

GameServerTemplateSpec

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

-

GameServer is the data structure for a gameserver resource

+

GameServerTemplateSpec is a template for GameServers

@@ -1273,23 +972,6 @@

GameServer

- - - - - - - -
-apiVersion
-string
- -stable.agones.dev/v1alpha1 - -
-kind
-string -
GameServer
metadata
@@ -1380,26 +1062,94 @@

GameServer

+ + +

Health +

+

+(Appears on: +GameServerSpec) +

+

+

Health configures health checking on the GameServer

+

+ + + + + + + + + + + + + + + + + + + +
FieldDescription
-status
+disabled
- -GameServerStatus - +bool + +
+

Disabled is whether health checking is disabled or not

+
+periodSeconds
+ +int32 + +
+

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

+
+failureThreshold
+ +int32 + +
+

FailureThreshold how many failures in a row constitutes unhealthy

+
+initialDelaySeconds
+ +int32
+

InitialDelaySeconds initial delay before checking health

-

GameServerSet +

PortPolicy +(string alias)

+

+(Appears on: +GameServerPort) +

+

+

PortPolicy is the port policy for the GameServer

+

+
+

allocation.agones.dev

+

+

Package v1 is the v1 version of the API.

+

+Resource Types: + +

GameServerAllocation

-

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

+

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

@@ -1415,7 +1165,7 @@

GameServerSet string

@@ -1424,7 +1174,7 @@

GameServerSet kind
string -

+ +
-stable.agones.dev/v1alpha1 +allocation.agones.dev/v1
GameServerSetGameServerAllocation
@@ -1442,26 +1192,57 @@

GameServerSet

-spec
+spec
+ + +GameServerAllocationSpec + + +
+
+
+ + + + + + + @@ -1505,15 +1287,14 @@

GameServerSet

+multiClusterSetting
+ + +MultiClusterSetting + + +
+

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

+
+required
- -GameServerSetSpec + +Kubernetes meta/v1.LabelSelector
-
-
- +

Required The required allocation. Defaults to all GameServers.

+ + @@ -1477,15 +1258,16 @@

GameServerSet

-replicas
+preferred
-int32 + +[]Kubernetes meta/v1.LabelSelector +
-

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

+

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

-template
+metadata
- -GameServerTemplateSpec + +MetaPatch
-

Template the GameServer template to apply for this GameServerSet

+

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

@@ -1495,8 +1277,8 @@

GameServerSet

status
- -GameServerSetStatus + +GameServerAllocationStatus
-

FleetAllocationSpec +

GameServerAllocationSpec

(Appears on: -FleetAllocation) +GameServerAllocation)

-

FleetAllocationSpec is the spec for a Fleet -Allocation

+

GameServerAllocationSpec is the spec for a GameServerAllocation

@@ -1525,12 +1306,55 @@

FleetAllocationSpec

+ + + + + + + + + + + + @@ -1543,20 +1367,29 @@

FleetAllocationSpec

-fleetName
+multiClusterSetting
-string + +MultiClusterSetting + + +
+

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

+
+required
+ + +Kubernetes meta/v1.LabelSelector + + +
+

Required The required allocation. Defaults to all GameServers.

+
+preferred
+ + +[]Kubernetes meta/v1.LabelSelector + + +
+

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

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

Scheduling strategy. Defaults to “Packed”.

+

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

-

FleetAllocationStatus +

GameServerAllocationState +(string alias)

+

+(Appears on: +GameServerAllocationStatus) +

+

+

GameServerAllocationState is the Allocation state

+

+

GameServerAllocationStatus

(Appears on: -FleetAllocation) +GameServerAllocation)

-

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

+

GameServerAllocationStatus is the status for an GameServerAllocation resource

@@ -1568,94 +1401,69 @@

FleetAllocationStatus

- -
-gameServer
+state
- -GameServer + +GameServerAllocationState
+

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

-

FleetSpec -

-

-(Appears on: -Fleet) -

-

-

FleetSpec is the spec for a Fleet

-

- - - - - - - -
FieldDescription
-replicas
+gameServerName
-int32 +string
-

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

-strategy
+ports
- -Kubernetes apps/v1.DeploymentStrategy + +[]GameServerStatusPort
-

Deployment strategy

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

Scheduling strategy. Defaults to “Packed”.

-template
+nodeName
- -GameServerTemplateSpec - +string
-

Template the GameServer template to apply for this Fleet

-

FleetStatus +

MetaPatch

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

-

FleetStatus is the status of a Fleet

+

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

@@ -1667,60 +1475,34 @@

FleetStatus

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

Replicas the total number of current GameServer replicas

-
-readyReplicas
- -int32 - -
-

ReadyReplicas are the number of Ready GameServer replicas

-
-reservedReplicas
+labels
-int32 +map[string]string
-

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

-allocatedReplicas
+annotations
-int32 +map[string]string
-

AllocatedReplicas are the number of Allocated GameServer replicas

-

GameServerPort +

MultiClusterSetting

(Appears on: -GameServerSpec) +GameServerAllocationSpec)

-

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

+

MultiClusterSetting specifies settings for multi-cluster allocation.

@@ -1732,131 +1514,142 @@

GameServerPort

+ +
-name
+enabled
-string +bool
-

Name is the descriptive name of the port

-portPolicy
+policySelector
- -PortPolicy + +Kubernetes meta/v1.LabelSelector
-

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

+
+

autoscaling.agones.dev

+

+

Package v1 is the v1 version of the API.

+

+Resource Types: + +

FleetAutoscaler +

+

+

FleetAutoscaler is the data structure for a FleetAutoscaler resource

+

+ + + + + + + + + + + + - - -
FieldDescription
-containerPort
- -int32 - +apiVersion
+string
+ +autoscaling.agones.dev/v1 +
-

ContainerPort is the port that is being opened on the game server process

+kind
+string
FleetAutoscaler
-hostPort
+metadata
-int32 + +Kubernetes meta/v1.ObjectMeta +
-

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

+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-protocol
+spec
- -Kubernetes core/v1.Protocol + +FleetAutoscalerSpec
-

Protocol is the network protocol being used. Defaults to UDP. TCP is the only other option

-
-

GameServerSetSpec -

-

-(Appears on: -GameServerSet) -

-

-

GameServerSetSpec the specification for

-

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

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

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

Scheduling strategy. Defaults to “Packed”.

+

Autoscaling policy

+
-template
+status
- -GameServerTemplateSpec + +FleetAutoscalerStatus
-

Template the GameServer template to apply for this GameServerSet

-

GameServerSetStatus +

BufferPolicy

(Appears on: -GameServerSet) +FleetAutoscalerPolicy)

-

GameServerSetStatus is the status of a GameServerSet

+

BufferPolicy controls the desired behavior of the buffer policy.

@@ -1868,70 +1661,59 @@

GameServerSetStatus

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

Replicas the total number of current GameServer replicas

-
-readyReplicas
- -int32 - -
-

ReadyReplicas are the number of Ready GameServer replicas

-
-reservedReplicas
+maxReplicas
int32
-

ReservedReplicas are the number of Reserved GameServer replicas

+

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

-allocatedReplicas
+minReplicas
int32
-

AllocatedReplicas are the number of Allocated GameServer replicas

+

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

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

ShutdownReplicas are the number of Shutdown GameServers replicas

+

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)

-

GameServerSpec +

FleetAutoscaleRequest

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

-

GameServerSpec is the spec for a GameServer resource

+

FleetAutoscaleRequest defines the request to webhook autoscaler endpoint

@@ -1943,85 +1725,63 @@

GameServerSpec

- - - -
-container
- -string - -
-

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

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

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

+

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.

-health
+name
- -Health - +string
-

Health configures health checking

+

Name is the name of the Fleet being scaled

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

Scheduling strategy. Defaults to “Packed”.

+

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

-template
+status
- -Kubernetes core/v1.PodTemplateSpec + +FleetStatus
-

Template describes the Pod that will be created for the GameServer

+

The Fleet’s status values

-

GameServerState -(string alias)

-

-(Appears on: -GameServerStatus) -

-

-

GameServerState is the state for the GameServer

-

-

GameServerStatus +

FleetAutoscaleResponse

(Appears on: -GameServer) +FleetAutoscaleReview)

-

GameServerStatus is the status for a GameServer resource

+

FleetAutoscaleResponse defines the response of webhook autoscaler endpoint

@@ -2033,61 +1793,45 @@

GameServerStatus

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

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

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

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

-address
+scale
-string +bool
+

Set to false if no scaling should occur to the Fleet

-nodeName
+replicas
-string +int32
+

The targeted replica count

-

GameServerStatusPort +

FleetAutoscaleReview

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

-

-

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

+

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

@@ -2099,9 +1843,11 @@

GameServerStatusPort

-name
+request
-string + +FleetAutoscaleRequest +
@@ -2109,9 +1855,11 @@

GameServerStatusPort

-port
+response
-int32 + +FleetAutoscaleResponse +
@@ -2119,126 +1867,126 @@

GameServerStatusPort

-

GameServerTemplateSpec +

FleetAutoscalerPolicy

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

-

GameServerTemplateSpec is a template for GameServers

+

FleetAutoscalerPolicy describes how to scale a fleet

- - - - - - - - - - - +
FieldDescription
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
+ + + + + +
FieldDescription
-spec
+type
- -GameServerSpec + +FleetAutoscalerPolicyType
-
-
- - - - + +
-container
- -string - -
-

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

+

Type of autoscaling policy.

-ports
+buffer
- -[]GameServerPort + +BufferPolicy
-

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

+(Optional) +

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

-health
+webhook
- -Health + +WebhookPolicy
-

Health configures health checking

+(Optional) +

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

+

FleetAutoscalerPolicyType +(string alias)

+

+(Appears on: +FleetAutoscalerPolicy) +

+

+

FleetAutoscalerPolicyType is the policy for autoscaling +for a given Fleet

+

+

FleetAutoscalerSpec +

+

+(Appears on: +FleetAutoscaler) +

+

+

FleetAutoscalerSpec is the spec for a Fleet Scaler

+

+ + + + + + + + - -
FieldDescription
-scheduling
+fleetName
-agones.dev/agones/pkg/apis.SchedulingStrategy +string
-

Scheduling strategy. Defaults to “Packed”.

-template
+policy
- -Kubernetes core/v1.PodTemplateSpec + +FleetAutoscalerPolicy
-

Template describes the Pod that will be created for the GameServer

-
+

Autoscaling policy

-

Health +

FleetAutoscalerStatus

(Appears on: -GameServerSpec) +FleetAutoscaler)

-

Health configures health checking on the GameServer

+

FleetAutoscalerStatus defines the current status of a FleetAutoscaler

@@ -2250,58 +1998,77 @@

Health

+ + + +
-disabled
+currentReplicas
-bool +int32
-

Disabled is whether health checking is disabled or not

+

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

-periodSeconds
+desiredReplicas
int32
-

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

+

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

-failureThreshold
+lastScaleTime
-int32 + +Kubernetes meta/v1.Time +
-

FailureThreshold how many failures in a row constitutes unhealthy

+(Optional) +

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

-initialDelaySeconds
+ableToScale
-int32 +bool
-

InitialDelaySeconds initial delay before checking health

+

AbleToScale indicates that we can access the target fleet

+
+scalingLimited
+ +bool + +
+

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

-

MetaPatch +

WebhookPolicy

(Appears on: -FleetAllocationSpec) +FleetAutoscalerPolicy)

-

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

+

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

@@ -2313,41 +2080,73 @@

MetaPatch

+ + + +
-labels
+url
-map[string]string +string + +
+(Optional) +

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

+

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

+

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

+

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

+

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

+

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

+
+service
+ + +Kubernetes admissionregistration/v1beta1.ServiceReference +
+(Optional) +

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

+

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

+

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

-annotations
+caBundle
-map[string]string +[]byte
+

caBundle is a PEM encoded CA bundle which will be used to validate +the webhook’s server certificate. +Required.

-

PortPolicy -(string alias)

-

-(Appears on: -GameServerPort) -

-

-

PortPolicy is the port policy for the GameServer

-


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

{{% /feature %}} -{{% feature publishVersion="0.12.0" %}} +{{% feature publishVersion="1.1.0" %}}

Packages: