v1

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=allocation.agones.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder registers our types
	SchemeBuilder = k8sruntime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme local alias for SchemeBuilder.AddToScheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: allocation.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

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

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

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

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          []agonesv1.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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GameServerAllocationStatus.

func (*GameServerAllocationStatus) DeepCopyInto

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

func (in *MetaPatch) DeepCopy() *MetaPatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaPatch.

func (*MetaPatch) DeepCopyInto

func (in *MetaPatch) DeepCopyInto(out *MetaPatch)

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.

func (*MultiClusterSetting) DeepCopy

func (in *MultiClusterSetting) DeepCopy() *MultiClusterSetting

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterSetting.

func (*MultiClusterSetting) DeepCopyInto

func (in *MultiClusterSetting) DeepCopyInto(out *MultiClusterSetting)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL