Documentation ¶
Overview ¶
Package v1 is the v1 version of the API. +groupName=autoscaling.agones.dev
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type BufferPolicy
- type CounterPolicy
- type FixedIntervalSync
- type FleetAutoscaleRequest
- type FleetAutoscaleResponse
- type FleetAutoscaleReview
- type FleetAutoscaler
- type FleetAutoscalerList
- type FleetAutoscalerPolicy
- type FleetAutoscalerPolicyType
- type FleetAutoscalerSpec
- type FleetAutoscalerStatus
- type FleetAutoscalerSync
- type FleetAutoscalerSyncType
- type ListPolicy
- type WebhookPolicy
Constants ¶
const ( // BufferPolicyType FleetAutoscalerPolicyType is a simple buffering strategy for Ready // GameServers BufferPolicyType FleetAutoscalerPolicyType = "Buffer" // WebhookPolicyType is a simple webhook strategy used for horizontal fleet scaling // GameServers WebhookPolicyType FleetAutoscalerPolicyType = "Webhook" // [Stage:Alpha] // [FeatureFlag:CountsAndLists] // CounterPolicyType is for Counter based fleet autoscaling // nolint:revive // Linter contains comment doesn't start with CounterPolicyType CounterPolicyType FleetAutoscalerPolicyType = "Counter" // [Stage:Alpha] // [FeatureFlag:CountsAndLists] // ListPolicyType is for List based fleet autoscaling // nolint:revive // Linter contains comment doesn't start with ListPolicyType ListPolicyType FleetAutoscalerPolicyType = "List" // FixedIntervalSyncType is a simple fixed interval based strategy for trigger autoscaling FixedIntervalSyncType FleetAutoscalerSyncType = "FixedInterval" )
Variables ¶
var ( // SchemeBuilder registers our types SchemeBuilder = k8sruntime.NewSchemeBuilder(addKnownTypes) // AddToScheme local alias for SchemeBuilder.AddToScheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: autoscaling.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type BufferPolicy ¶
type BufferPolicy struct { // MaxReplicas is the maximum amount of replicas that the fleet may have. // It must be bigger than both MinReplicas and BufferSize MaxReplicas int32 `json:"maxReplicas"` // 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 MinReplicas int32 `json:"minReplicas"` // 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) BufferSize intstr.IntOrString `json:"bufferSize"` }
BufferPolicy controls the desired behavior of the buffer policy.
func (*BufferPolicy) DeepCopy ¶
func (in *BufferPolicy) DeepCopy() *BufferPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BufferPolicy.
func (*BufferPolicy) DeepCopyInto ¶
func (in *BufferPolicy) DeepCopyInto(out *BufferPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BufferPolicy) ValidateBufferPolicy ¶
func (b *BufferPolicy) ValidateBufferPolicy(fldPath *field.Path) field.ErrorList
ValidateBufferPolicy validates the FleetAutoscaler Buffer policy settings
type CounterPolicy ¶ added in v1.33.0
type CounterPolicy struct { // Key is the name of the Counter. Required field. Key string `json:"key"` // MaxCapacity is the maximum aggregate Counter total capacity across the fleet. // MaxCapacity must be bigger than both MinCapacity and BufferSize. Required field. MaxCapacity int64 `json:"maxCapacity"` // MinCapacity is the minimum aggregate Counter total capacity across the fleet. // If zero, MinCapacity is ignored. // If non zero, MinCapacity must be smaller than MaxCapacity and bigger than BufferSize. MinCapacity int64 `json:"minCapacity"` // BufferSize is the size of a buffer of counted items that are available in the Fleet (available // capacity). Value can be an absolute number (ex: 5) or a percentage of desired gs instances // (ex: 5%). An absolute number is calculated from percentage by rounding up. // Must be bigger than 0. Required field. BufferSize intstr.IntOrString `json:"bufferSize"` }
CounterPolicy controls the desired behavior of the Counter autoscaler policy.
func (*CounterPolicy) DeepCopy ¶ added in v1.33.0
func (in *CounterPolicy) DeepCopy() *CounterPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CounterPolicy.
func (*CounterPolicy) DeepCopyInto ¶ added in v1.33.0
func (in *CounterPolicy) DeepCopyInto(out *CounterPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CounterPolicy) ValidateCounterPolicy ¶ added in v1.33.0
func (c *CounterPolicy) ValidateCounterPolicy(fldPath *field.Path) field.ErrorList
ValidateCounterPolicy validates the FleetAutoscaler Counter policy settings. Does not validate if a Counter with name CounterPolicy.Key is present in the fleet. nolint:dupl // Linter errors on lines are duplicate of ValidateListPolicy
type FixedIntervalSync ¶ added in v1.17.0
type FixedIntervalSync struct { // Seconds defines how often we run fleet autoscaling in seconds Seconds int32 `json:"seconds"` }
FixedIntervalSync controls the desired behavior of the fixed interval based sync.
func (*FixedIntervalSync) DeepCopy ¶ added in v1.17.0
func (in *FixedIntervalSync) DeepCopy() *FixedIntervalSync
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FixedIntervalSync.
func (*FixedIntervalSync) DeepCopyInto ¶ added in v1.17.0
func (in *FixedIntervalSync) DeepCopyInto(out *FixedIntervalSync)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FixedIntervalSync) ValidateFixedIntervalSync ¶ added in v1.17.0
func (i *FixedIntervalSync) ValidateFixedIntervalSync(fldPath *field.Path) field.ErrorList
ValidateFixedIntervalSync validates the FixedIntervalSync settings
type FleetAutoscaleRequest ¶
type FleetAutoscaleRequest struct { // 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. UID types.UID `json:"uid"` // Name is the name of the Fleet being scaled Name string `json:"name"` // Namespace is the namespace associated with the request (if any). Namespace string `json:"namespace"` // The Fleet's status values Status agonesv1.FleetStatus `json:"status"` }
FleetAutoscaleRequest defines the request to webhook autoscaler endpoint
func (*FleetAutoscaleRequest) DeepCopy ¶
func (in *FleetAutoscaleRequest) DeepCopy() *FleetAutoscaleRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscaleRequest.
func (*FleetAutoscaleRequest) DeepCopyInto ¶
func (in *FleetAutoscaleRequest) DeepCopyInto(out *FleetAutoscaleRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FleetAutoscaleResponse ¶
type FleetAutoscaleResponse struct { // UID is an identifier for the individual request/response. // This should be copied over from the corresponding FleetAutoscaleRequest. UID types.UID `json:"uid"` // Set to false if no scaling should occur to the Fleet Scale bool `json:"scale"` // The targeted replica count Replicas int32 `json:"replicas"` }
FleetAutoscaleResponse defines the response of webhook autoscaler endpoint
func (*FleetAutoscaleResponse) DeepCopy ¶
func (in *FleetAutoscaleResponse) DeepCopy() *FleetAutoscaleResponse
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscaleResponse.
func (*FleetAutoscaleResponse) DeepCopyInto ¶
func (in *FleetAutoscaleResponse) DeepCopyInto(out *FleetAutoscaleResponse)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FleetAutoscaleReview ¶
type FleetAutoscaleReview struct { Request *FleetAutoscaleRequest `json:"request"` Response *FleetAutoscaleResponse `json:"response"` }
FleetAutoscaleReview is passed to the webhook with a populated Request value, and then returned with a populated Response.
func (*FleetAutoscaleReview) DeepCopy ¶
func (in *FleetAutoscaleReview) DeepCopy() *FleetAutoscaleReview
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscaleReview.
func (*FleetAutoscaleReview) DeepCopyInto ¶
func (in *FleetAutoscaleReview) DeepCopyInto(out *FleetAutoscaleReview)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FleetAutoscaler ¶
type FleetAutoscaler struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FleetAutoscalerSpec `json:"spec"` Status FleetAutoscalerStatus `json:"status"` }
FleetAutoscaler is the data structure for a FleetAutoscaler resource
func (*FleetAutoscaler) ApplyDefaults ¶ added in v1.17.0
func (fas *FleetAutoscaler) ApplyDefaults()
ApplyDefaults applies default values to the FleetAutoscaler
func (*FleetAutoscaler) DeepCopy ¶
func (in *FleetAutoscaler) DeepCopy() *FleetAutoscaler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscaler.
func (*FleetAutoscaler) DeepCopyInto ¶
func (in *FleetAutoscaler) DeepCopyInto(out *FleetAutoscaler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FleetAutoscaler) DeepCopyObject ¶
func (in *FleetAutoscaler) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*FleetAutoscaler) Validate ¶
func (fas *FleetAutoscaler) Validate() field.ErrorList
Validate validates the FleetAutoscaler scaling settings
type FleetAutoscalerList ¶
type FleetAutoscalerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []FleetAutoscaler `json:"items"` }
FleetAutoscalerList is a list of Fleet Scaler resources
func (*FleetAutoscalerList) DeepCopy ¶
func (in *FleetAutoscalerList) DeepCopy() *FleetAutoscalerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscalerList.
func (*FleetAutoscalerList) DeepCopyInto ¶
func (in *FleetAutoscalerList) DeepCopyInto(out *FleetAutoscalerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FleetAutoscalerList) DeepCopyObject ¶
func (in *FleetAutoscalerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FleetAutoscalerPolicy ¶
type FleetAutoscalerPolicy struct { // Type of autoscaling policy. Type FleetAutoscalerPolicyType `json:"type"` // Buffer policy config params. Present only if FleetAutoscalerPolicyType = Buffer. // +optional Buffer *BufferPolicy `json:"buffer,omitempty"` // Webhook policy config params. Present only if FleetAutoscalerPolicyType = Webhook. // +optional Webhook *WebhookPolicy `json:"webhook,omitempty"` // [Stage:Alpha] // [FeatureFlag:CountsAndLists] // Counter policy config params. Present only if FleetAutoscalerPolicyType = Counter. // +optional Counter *CounterPolicy `json:"counter,omitempty"` // [Stage:Alpha] // [FeatureFlag:CountsAndLists] // List policy config params. Present only if FleetAutoscalerPolicyType = List. // +optional List *ListPolicy `json:"list,omitempty"` }
FleetAutoscalerPolicy describes how to scale a fleet
func (*FleetAutoscalerPolicy) DeepCopy ¶
func (in *FleetAutoscalerPolicy) DeepCopy() *FleetAutoscalerPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscalerPolicy.
func (*FleetAutoscalerPolicy) DeepCopyInto ¶
func (in *FleetAutoscalerPolicy) DeepCopyInto(out *FleetAutoscalerPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FleetAutoscalerPolicyType ¶
type FleetAutoscalerPolicyType string
FleetAutoscalerPolicyType is the policy for autoscaling for a given Fleet
type FleetAutoscalerSpec ¶
type FleetAutoscalerSpec struct { FleetName string `json:"fleetName"` // Autoscaling policy Policy FleetAutoscalerPolicy `json:"policy"` // Sync defines when FleetAutoscalers runs autoscaling // +optional Sync *FleetAutoscalerSync `json:"sync,omitempty"` }
FleetAutoscalerSpec is the spec for a Fleet Scaler
func (*FleetAutoscalerSpec) DeepCopy ¶
func (in *FleetAutoscalerSpec) DeepCopy() *FleetAutoscalerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscalerSpec.
func (*FleetAutoscalerSpec) DeepCopyInto ¶
func (in *FleetAutoscalerSpec) DeepCopyInto(out *FleetAutoscalerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FleetAutoscalerStatus ¶
type FleetAutoscalerStatus struct { // CurrentReplicas is the current number of gameserver replicas // of the fleet managed by this autoscaler, as last seen by the autoscaler CurrentReplicas int32 `json:"currentReplicas"` // DesiredReplicas is the desired number of gameserver replicas // of the fleet managed by this autoscaler, as last calculated by the autoscaler DesiredReplicas int32 `json:"desiredReplicas"` // lastScaleTime is the last time the FleetAutoscaler scaled the attached fleet, // +optional LastScaleTime *metav1.Time `json:"lastScaleTime"` // AbleToScale indicates that we can access the target fleet AbleToScale bool `json:"ableToScale"` // ScalingLimited indicates that the calculated scale would be above or below the range // defined by MinReplicas and MaxReplicas, and has thus been capped. ScalingLimited bool `json:"scalingLimited"` }
FleetAutoscalerStatus defines the current status of a FleetAutoscaler
func (*FleetAutoscalerStatus) DeepCopy ¶
func (in *FleetAutoscalerStatus) DeepCopy() *FleetAutoscalerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscalerStatus.
func (*FleetAutoscalerStatus) DeepCopyInto ¶
func (in *FleetAutoscalerStatus) DeepCopyInto(out *FleetAutoscalerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FleetAutoscalerSync ¶ added in v1.17.0
type FleetAutoscalerSync struct { // Type of autoscaling sync. Type FleetAutoscalerSyncType `json:"type"` // FixedInterval config params. Present only if FleetAutoscalerSyncType = FixedInterval. // +optional FixedInterval FixedIntervalSync `json:"fixedInterval"` }
FleetAutoscalerSync describes when to sync a fleet
func (*FleetAutoscalerSync) DeepCopy ¶ added in v1.17.0
func (in *FleetAutoscalerSync) DeepCopy() *FleetAutoscalerSync
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetAutoscalerSync.
func (*FleetAutoscalerSync) DeepCopyInto ¶ added in v1.17.0
func (in *FleetAutoscalerSync) DeepCopyInto(out *FleetAutoscalerSync)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FleetAutoscalerSyncType ¶ added in v1.17.0
type FleetAutoscalerSyncType string
FleetAutoscalerSyncType is the sync strategy for a given Fleet
type ListPolicy ¶ added in v1.33.0
type ListPolicy struct { // Key is the name of the List. Required field. Key string `json:"key"` // MaxCapacity is the maximum aggregate List total capacity across the fleet. // MaxCapacity must be bigger than both MinCapacity and BufferSize. Required field. MaxCapacity int64 `json:"maxCapacity"` // MinCapacity is the minimum aggregate List total capacity across the fleet. // If zero, it is ignored. // If non zero, it must be smaller than MaxCapacity and bigger than BufferSize. MinCapacity int64 `json:"minCapacity"` // BufferSize is the size of a buffer based on the List capacity that is available over the // current aggregate List length in the Fleet (available capacity). It can be specified either // as an absolute value (i.e. 5) or percentage format (i.e. 5%). // Must be bigger than 0. Required field. BufferSize intstr.IntOrString `json:"bufferSize"` }
ListPolicy controls the desired behavior of the List autoscaler policy.
func (*ListPolicy) DeepCopy ¶ added in v1.33.0
func (in *ListPolicy) DeepCopy() *ListPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListPolicy.
func (*ListPolicy) DeepCopyInto ¶ added in v1.33.0
func (in *ListPolicy) DeepCopyInto(out *ListPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ListPolicy) ValidateListPolicy ¶ added in v1.33.0
func (l *ListPolicy) ValidateListPolicy(fldPath *field.Path) field.ErrorList
ValidateListPolicy validates the FleetAutoscaler List policy settings. Does not validate if a List with name ListPolicy.Key is present in the fleet. nolint:dupl // Linter errors on lines are duplicate of ValidateCounterPolicy
type WebhookPolicy ¶
type WebhookPolicy admregv1.WebhookClientConfig
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
func (*WebhookPolicy) DeepCopy ¶
func (in *WebhookPolicy) DeepCopy() *WebhookPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookPolicy.
func (*WebhookPolicy) DeepCopyInto ¶
func (in *WebhookPolicy) DeepCopyInto(out *WebhookPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WebhookPolicy) ValidateWebhookPolicy ¶
func (w *WebhookPolicy) ValidateWebhookPolicy(fldPath *field.Path) field.ErrorList
ValidateWebhookPolicy validates the FleetAutoscaler Webhook policy settings