Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=allocation.agones.dev
Index ¶
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type GameServerAllocation
- func (gsa *GameServerAllocation) ApplyDefaults()
- func (in *GameServerAllocation) DeepCopy() *GameServerAllocation
- func (in *GameServerAllocation) DeepCopyInto(out *GameServerAllocation)
- func (in *GameServerAllocation) DeepCopyObject() runtime.Object
- func (gsa *GameServerAllocation) Validate() ([]metav1.StatusCause, bool)
- type GameServerAllocationList
- type GameServerAllocationSpec
- type GameServerAllocationState
- type GameServerAllocationStatus
- type MetaPatch
- type MultiClusterSetting
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeBuilder registers our types SchemeBuilder = k8sruntime.NewSchemeBuilder(addKnownTypes) // AddToScheme local alias for SchemeBuilder.AddToScheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: allocation.GroupName, Version: "v1alpha1"}
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 GameServerAllocation ¶
type GameServerAllocation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GameServerAllocationSpec `json:"spec"` Status GameServerAllocationStatus `json:"status,omitempty"` }
GameServerAllocation is the data structure for allocating against a set of GameServers, defined `required` and `preferred` selectors
func (*GameServerAllocation) ApplyDefaults ¶
func (gsa *GameServerAllocation) ApplyDefaults()
ApplyDefaults applies the default values to this GameServerAllocation
func (*GameServerAllocation) DeepCopy ¶
func (in *GameServerAllocation) DeepCopy() *GameServerAllocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GameServerAllocation.
func (*GameServerAllocation) DeepCopyInto ¶
func (in *GameServerAllocation) DeepCopyInto(out *GameServerAllocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GameServerAllocation) DeepCopyObject ¶
func (in *GameServerAllocation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GameServerAllocation) Validate ¶
func (gsa *GameServerAllocation) Validate() ([]metav1.StatusCause, bool)
Validate validation for the GameServerAllocation
type GameServerAllocationList ¶
type GameServerAllocationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []GameServerAllocation `json:"items"` }
GameServerAllocationList is a list of GameServer Allocation resources
func (*GameServerAllocationList) DeepCopy ¶
func (in *GameServerAllocationList) DeepCopy() *GameServerAllocationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GameServerAllocationList.
func (*GameServerAllocationList) DeepCopyInto ¶
func (in *GameServerAllocationList) DeepCopyInto(out *GameServerAllocationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GameServerAllocationList) DeepCopyObject ¶
func (in *GameServerAllocationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GameServerAllocationSpec ¶
type GameServerAllocationSpec struct { // MultiClusterPolicySelector if specified, multi-cluster policies are applied. // Otherwise, allocation will happen locally. MultiClusterSetting MultiClusterSetting `json:"multiClusterSetting,omitempty"` // Required The required allocation. Defaults to all GameServers. Required metav1.LabelSelector `json:"required,omitempty"` // 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. Preferred []metav1.LabelSelector `json:"preferred,omitempty"` // Scheduling strategy. Defaults to "Packed". Scheduling apis.SchedulingStrategy `json:"scheduling"` // 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 MetaPatch MetaPatch `json:"metadata,omitempty"` }
GameServerAllocationSpec is the spec for a GameServerAllocation
func (*GameServerAllocationSpec) DeepCopy ¶
func (in *GameServerAllocationSpec) DeepCopy() *GameServerAllocationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GameServerAllocationSpec.
func (*GameServerAllocationSpec) DeepCopyInto ¶
func (in *GameServerAllocationSpec) DeepCopyInto(out *GameServerAllocationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GameServerAllocationSpec) PreferredSelectors ¶
func (gsas *GameServerAllocationSpec) PreferredSelectors() ([]labels.Selector, error)
PreferredSelectors converts all the preferred label selectors into an array of labels.Selectors. This is useful as they all have `Match()` functions!
type GameServerAllocationState ¶
type GameServerAllocationState string
GameServerAllocationState is the Allocation state
const ( // GameServerAllocationAllocated is allocation successful GameServerAllocationAllocated GameServerAllocationState = "Allocated" // GameServerAllocationUnAllocated when the allocation is unsuccessful GameServerAllocationUnAllocated GameServerAllocationState = "UnAllocated" // GameServerAllocationContention when the allocation is unsuccessful // because of contention GameServerAllocationContention GameServerAllocationState = "Contention" )
type GameServerAllocationStatus ¶
type GameServerAllocationStatus struct { // GameServerState is the current state of an GameServerAllocation, e.g. Allocated, or UnAllocated State GameServerAllocationState `json:"state"` GameServerName string `json:"gameServerName"` Ports []v1alpha1.GameServerStatusPort `json:"ports,omitempty"` Address string `json:"address,omitempty"` NodeName string `json:"nodeName,omitempty"` }
GameServerAllocationStatus is the status for an GameServerAllocation resource
func (*GameServerAllocationStatus) DeepCopy ¶
func (in *GameServerAllocationStatus) DeepCopy() *GameServerAllocationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GameServerAllocationStatus.
func (*GameServerAllocationStatus) DeepCopyInto ¶
func (in *GameServerAllocationStatus) DeepCopyInto(out *GameServerAllocationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetaPatch ¶
type MetaPatch struct { Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` }
MetaPatch is the metadata used to patch the GameServer metadata on allocation
func (*MetaPatch) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaPatch.
func (*MetaPatch) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MultiClusterSetting ¶
type MultiClusterSetting struct { Enabled bool `json:"enabled,omitempty"` PolicySelector metav1.LabelSelector `json:"policySelector,omitempty"` }
MultiClusterSetting specifies settings for multi-cluster allocation.