v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=stable.agones.dev

Index

Constants

View Source
const (
	// PortAllocation is for when a dynamically allocating GameServer
	// is being created, an open port needs to be allocated
	PortAllocation State = "PortAllocation"
	// Creating is before the Pod for the GameServer is being created
	Creating State = "Creating"
	// Starting is for when the Pods for the GameServer are being
	// created but are not yet Scheduled
	Starting State = "Starting"
	// Scheduled is for when we have determined that the Pod has been
	// scheduled in the cluster -- basically, we have a NodeName
	Scheduled State = "Scheduled"
	// RequestReady is when the GameServer has declared that it is ready
	RequestReady State = "RequestReady"
	// Ready is when a GameServer is ready to take connections
	// from Game clients
	Ready State = "Ready"
	// Shutdown is when the GameServer has shutdown and everything needs to be
	// deleted from the cluster
	Shutdown State = "Shutdown"
	// Error is when something has gone with the Gameserver and
	// it cannot be resolved
	Error State = "Error"
	// Unhealthy is when the GameServer has failed its health checks
	Unhealthy State = "Unhealthy"
	// Allocated is when the GameServer has been allocated to a session
	Allocated State = "Allocated"

	// Static PortPolicy means that the user defines the hostPort to be used
	// in the configuration.
	Static PortPolicy = "static"
	// Dynamic PortPolicy means that the system will choose an open
	// port for the GameServer in question
	Dynamic PortPolicy = "dynamic"

	// RoleLabel is the label in which the Agones role is specified.
	// Pods from a GameServer will have the value "gameserver"
	RoleLabel = stable.GroupName + "/role"
	// GameServerLabelRole is the GameServer label value for RoleLabel
	GameServerLabelRole = "gameserver"
	// GameServerPodLabel is the label that the name of the GameServer
	// is set on the Pod the GameServer controls
	GameServerPodLabel = stable.GroupName + "/gameserver"
	// GameServerContainerAnnotation is the annotation that stores
	// which container is the container that runs the dedicated game server
	GameServerContainerAnnotation = stable.GroupName + "/container"
	// SidecarServiceAccountName is the default service account for managing access to get/update GameServers
	SidecarServiceAccountName = "agones-sdk"
)
View Source
const (
	// FleetGameServerSetLabel is the label that the name of the Fleet
	// is set to on the GameServerSet the Fleet controls
	FleetGameServerSetLabel = stable.GroupName + "/fleet"
)
View Source
const (
	// GameServerSetGameServerLabel is the label that the name of the GameServerSet
	// is set on the GameServer the GameServerSet controls
	GameServerSetGameServerLabel = stable.GroupName + "/gameserverset"
)

Variables

View Source
var (
	// SchemeBuilder registers our types
	SchemeBuilder = k8sruntime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme local alias for SchemeBuilder.AddToScheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// GameServerRolePodSelector is the selector to get all GameServer Pods
	GameServerRolePodSelector = labels.SelectorFromSet(labels.Set{RoleLabel: GameServerLabelRole})
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: stable.GroupName, Version: "v1alpha1"}

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

func SumStatusAllocatedReplicas

func SumStatusAllocatedReplicas(list []*GameServerSet) int32

SumStatusAllocatedReplicas returns the total number of Status.AllocatedReplicas in the list of GameServerSets

func SumStatusReplicas

func SumStatusReplicas(list []*GameServerSet) int32

SumStatusReplicas returns the total number of Status.Replicas in the list of GameServerSets

Types

type BufferPolicy added in v0.5.0

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 added in v0.5.0

func (in *BufferPolicy) DeepCopy() *BufferPolicy

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

func (*BufferPolicy) DeepCopyInto added in v0.5.0

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) ValidateAutoScalingBufferPolicy added in v0.5.0

func (b *BufferPolicy) ValidateAutoScalingBufferPolicy(causes []metav1.StatusCause) []metav1.StatusCause

ValidateAutoScalingSettings validates the FleetAutoscaler Buffer policy settings

type Fleet

type Fleet struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   FleetSpec   `json:"spec"`
	Status FleetStatus `json:"status"`
}

Fleet is the data structure for a gameserver resource

func (*Fleet) ApplyDefaults

func (f *Fleet) ApplyDefaults()

ApplyDefaults applies default values to the Fleet

func (*Fleet) DeepCopy

func (in *Fleet) DeepCopy() *Fleet

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

func (*Fleet) DeepCopyInto

func (in *Fleet) DeepCopyInto(out *Fleet)

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

func (*Fleet) DeepCopyObject

func (in *Fleet) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Fleet) GameServerSet

func (f *Fleet) GameServerSet() *GameServerSet

GameServerSet returns a single GameServerSet for this Fleet definition

func (*Fleet) LowerBoundReplicas

func (f *Fleet) LowerBoundReplicas(i int32) int32

LowerBoundReplicas returns 0 (the minimum value for replicas) if i is < 0

func (*Fleet) UpperBoundReplicas

func (f *Fleet) UpperBoundReplicas(i int32) int32

UpperBoundReplicas returns whichever is smaller, the value i, or the f.Spec.Replicas.

type FleetAllocation

type FleetAllocation struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   FleetAllocationSpec   `json:"spec"`
	Status FleetAllocationStatus `json:"status,omitempty"`
}

FleetAllocation is the data structure for allocating against a Fleet

func (*FleetAllocation) DeepCopy

func (in *FleetAllocation) DeepCopy() *FleetAllocation

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

func (*FleetAllocation) DeepCopyInto

func (in *FleetAllocation) DeepCopyInto(out *FleetAllocation)

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

func (*FleetAllocation) DeepCopyObject

func (in *FleetAllocation) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*FleetAllocation) ValidateUpdate

func (fa *FleetAllocation) ValidateUpdate(new *FleetAllocation) (bool, []metav1.StatusCause)

ValidateUpdate validates when an update occurs

type FleetAllocationList

type FleetAllocationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []FleetAllocation `json:"items"`
}

FleetAllocationList is a list of Fleet Allocation resources

func (*FleetAllocationList) DeepCopy

func (in *FleetAllocationList) DeepCopy() *FleetAllocationList

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

func (*FleetAllocationList) DeepCopyInto

func (in *FleetAllocationList) DeepCopyInto(out *FleetAllocationList)

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

func (*FleetAllocationList) DeepCopyObject

func (in *FleetAllocationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FleetAllocationMeta added in v0.4.0

type FleetAllocationMeta struct {
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

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

func (*FleetAllocationMeta) DeepCopy added in v0.4.0

func (in *FleetAllocationMeta) DeepCopy() *FleetAllocationMeta

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

func (*FleetAllocationMeta) DeepCopyInto added in v0.4.0

func (in *FleetAllocationMeta) DeepCopyInto(out *FleetAllocationMeta)

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

type FleetAllocationSpec

type FleetAllocationSpec struct {
	FleetName string              `json:"fleetName"`
	MetaPatch FleetAllocationMeta `json:"metadata,omitempty"`
}

FleetAllocationSpec is the spec for a Fleet Allocation

func (*FleetAllocationSpec) DeepCopy

func (in *FleetAllocationSpec) DeepCopy() *FleetAllocationSpec

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

func (*FleetAllocationSpec) DeepCopyInto

func (in *FleetAllocationSpec) DeepCopyInto(out *FleetAllocationSpec)

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

type FleetAllocationStatus

type FleetAllocationStatus struct {
	GameServer *GameServer `json:"gameServer,omitempty"`
}

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

func (*FleetAllocationStatus) DeepCopy

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

func (*FleetAllocationStatus) DeepCopyInto

func (in *FleetAllocationStatus) DeepCopyInto(out *FleetAllocationStatus)

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

type FleetAutoscaler added in v0.5.0

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) DeepCopy added in v0.5.0

func (in *FleetAutoscaler) DeepCopy() *FleetAutoscaler

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

func (*FleetAutoscaler) DeepCopyInto added in v0.5.0

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 added in v0.5.0

func (in *FleetAutoscaler) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*FleetAutoscaler) ValidateAutoScalingSettings added in v0.5.0

func (fas *FleetAutoscaler) ValidateAutoScalingSettings(causes []metav1.StatusCause) []metav1.StatusCause

ValidateAutoScalingSettings validates the FleetAutoscaler scaling settings

func (*FleetAutoscaler) ValidateUpdate added in v0.5.0

func (fas *FleetAutoscaler) ValidateUpdate(new *FleetAutoscaler, causes []metav1.StatusCause) []metav1.StatusCause

ValidateUpdate validates when an update occurs

type FleetAutoscalerList added in v0.5.0

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 added in v0.5.0

func (in *FleetAutoscalerList) DeepCopy() *FleetAutoscalerList

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

func (*FleetAutoscalerList) DeepCopyInto added in v0.5.0

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 added in v0.5.0

func (in *FleetAutoscalerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FleetAutoscalerPolicy added in v0.5.0

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"`
}

FleetAutoscalerPolicy describes how to scale a fleet

func (*FleetAutoscalerPolicy) DeepCopy added in v0.5.0

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

func (*FleetAutoscalerPolicy) DeepCopyInto added in v0.5.0

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 added in v0.5.0

type FleetAutoscalerPolicyType string
const (
	// Kill all existing pods before creating new ones.
	BufferPolicyType FleetAutoscalerPolicyType = "Buffer"
)

type FleetAutoscalerSpec added in v0.5.0

type FleetAutoscalerSpec struct {
	FleetName string `json:"fleetName"`

	// Autoscaling policy
	Policy FleetAutoscalerPolicy `json:"policy"`
}

FleetAutoscalerSpec is the spec for a Fleet Scaler

func (*FleetAutoscalerSpec) DeepCopy added in v0.5.0

func (in *FleetAutoscalerSpec) DeepCopy() *FleetAutoscalerSpec

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

func (*FleetAutoscalerSpec) DeepCopyInto added in v0.5.0

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 added in v0.5.0

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 added in v0.5.0

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

func (*FleetAutoscalerStatus) DeepCopyInto added in v0.5.0

func (in *FleetAutoscalerStatus) DeepCopyInto(out *FleetAutoscalerStatus)

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

type FleetList

type FleetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Fleet `json:"items"`
}

FleetList is a list of GameServer resources

func (*FleetList) DeepCopy

func (in *FleetList) DeepCopy() *FleetList

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

func (*FleetList) DeepCopyInto

func (in *FleetList) DeepCopyInto(out *FleetList)

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

func (*FleetList) DeepCopyObject

func (in *FleetList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FleetSpec

type FleetSpec struct {
	// Replicas are the number of GameServers that should be in this set
	Replicas int32 `json:"replicas"`
	// Deployment strategy
	Strategy appsv1.DeploymentStrategy `json:"strategy"`
	// Template the GameServer template to apply for this Fleet
	Template GameServerTemplateSpec `json:"template"`
}

FleetSpec is the spec for a Fleet

func (*FleetSpec) DeepCopy

func (in *FleetSpec) DeepCopy() *FleetSpec

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

func (*FleetSpec) DeepCopyInto

func (in *FleetSpec) DeepCopyInto(out *FleetSpec)

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

type FleetStatus

type FleetStatus struct {
	// Replicas the total number of current GameServer replicas
	Replicas int32 `json:"replicas"`
	// ReadyReplicas are the number of Ready GameServer replicas
	ReadyReplicas int32 `json:"readyReplicas"`
	// AllocatedReplicas are the number of Allocated GameServer replicas
	AllocatedReplicas int32 `json:"allocatedReplicas"`
}

FleetStatus is the status of a GameServerSet

func (*FleetStatus) DeepCopy

func (in *FleetStatus) DeepCopy() *FleetStatus

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

func (*FleetStatus) DeepCopyInto

func (in *FleetStatus) DeepCopyInto(out *FleetStatus)

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

type GameServer

type GameServer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GameServerSpec   `json:"spec"`
	Status GameServerStatus `json:"status"`
}

GameServer is the data structure for a gameserver resource

func (*GameServer) ApplyDefaults

func (gs *GameServer) ApplyDefaults()

ApplyDefaults applies default values to the GameServer if they are not already populated

func (*GameServer) CountPorts added in v0.3.0

func (gs *GameServer) CountPorts(policy PortPolicy) int

CountPorts returns the number of ports that have this type of PortPolicy

func (*GameServer) DeepCopy

func (in *GameServer) DeepCopy() *GameServer

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

func (*GameServer) DeepCopyInto

func (in *GameServer) DeepCopyInto(out *GameServer)

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

func (*GameServer) DeepCopyObject

func (in *GameServer) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GameServer) FindGameServerContainer

func (gs *GameServer) FindGameServerContainer() (int, corev1.Container, error)

FindGameServerContainer returns the container that is specified in spec.gameServer.container. Returns the index and the value. Returns an error if not found

func (*GameServer) HasPortPolicy added in v0.3.0

func (gs *GameServer) HasPortPolicy(policy PortPolicy) bool

HasPortPolicy checks if there is a port with a given PortPolicy

func (*GameServer) Pod

func (gs *GameServer) Pod(sidecars ...corev1.Container) (*corev1.Pod, error)

Pod creates a new Pod from the PodTemplateSpec attached to the GameServer resource

func (*GameServer) Validate

func (gs *GameServer) Validate() (bool, []metav1.StatusCause)

Validate validates the GameServer configuration. If a GameServer is invalid there will be > 0 values in the returned array

type GameServerList

type GameServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []GameServer `json:"items"`
}

GameServerList is a list of GameServer resources

func (*GameServerList) DeepCopy

func (in *GameServerList) DeepCopy() *GameServerList

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

func (*GameServerList) DeepCopyInto

func (in *GameServerList) DeepCopyInto(out *GameServerList)

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

func (*GameServerList) DeepCopyObject

func (in *GameServerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GameServerPort added in v0.3.0

type GameServerPort struct {
	// Name is the descriptive name of the port
	Name string `json:"name,omitempty"`
	// 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` is the policy specified, `HostPort` is required, to specify the port that game clients will
	// connect to
	PortPolicy PortPolicy `json:"portPolicy,omitempty"`
	// ContainerPort is the port that is being opened on the game server process
	ContainerPort int32 `json:"containerPort"`
	// HostPort the port exposed on the host for clients to connect to
	HostPort int32 `json:"hostPort,omitempty"`
	// Protocol is the network protocol being used. Defaults to UDP. TCP is the only other option
	Protocol corev1.Protocol `json:"protocol,omitempty"`
}

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

func (*GameServerPort) DeepCopy added in v0.3.0

func (in *GameServerPort) DeepCopy() *GameServerPort

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

func (*GameServerPort) DeepCopyInto added in v0.3.0

func (in *GameServerPort) DeepCopyInto(out *GameServerPort)

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

func (GameServerPort) Status added in v0.3.0

Status returns a GameServerSatusPort for this GameServerPort

type GameServerSet

type GameServerSet struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GameServerSetSpec   `json:"spec"`
	Status GameServerSetStatus `json:"status"`
}

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

func (*GameServerSet) DeepCopy

func (in *GameServerSet) DeepCopy() *GameServerSet

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

func (*GameServerSet) DeepCopyInto

func (in *GameServerSet) DeepCopyInto(out *GameServerSet)

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

func (*GameServerSet) DeepCopyObject

func (in *GameServerSet) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GameServerSet) GameServer

func (gsSet *GameServerSet) GameServer() *GameServer

GameServer returns a single GameServer derived from the GameSever template

func (*GameServerSet) ValidateUpdate

func (gsSet *GameServerSet) ValidateUpdate(new *GameServerSet) (bool, []metav1.StatusCause)

ValidateUpdate validates when updates occur. The argument is the new GameServerSet, being passed into the old GameServerSet

type GameServerSetList

type GameServerSetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []GameServerSet `json:"items"`
}

GameServerSetList is a list of GameServerSet resources

func (*GameServerSetList) DeepCopy

func (in *GameServerSetList) DeepCopy() *GameServerSetList

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

func (*GameServerSetList) DeepCopyInto

func (in *GameServerSetList) DeepCopyInto(out *GameServerSetList)

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

func (*GameServerSetList) DeepCopyObject

func (in *GameServerSetList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GameServerSetSpec

type GameServerSetSpec struct {
	// Replicas are the number of GameServers that should be in this set
	Replicas int32 `json:"replicas"`
	// Template the GameServer template to apply for this GameServerSet
	Template GameServerTemplateSpec `json:"template"`
}

GameServerSetSpec the specification for

func (*GameServerSetSpec) DeepCopy

func (in *GameServerSetSpec) DeepCopy() *GameServerSetSpec

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

func (*GameServerSetSpec) DeepCopyInto

func (in *GameServerSetSpec) DeepCopyInto(out *GameServerSetSpec)

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

type GameServerSetStatus

type GameServerSetStatus struct {
	// Replicas the total number of current GameServer replicas
	Replicas int32 `json:"replicas"`
	// ReadyReplicas are the number of Ready GameServer replicas
	ReadyReplicas int32 `json:"readyReplicas"`
	// AllocatedReplicas are the number of Allocated GameServer replicas
	AllocatedReplicas int32 `json:"allocatedReplicas"`
}

GameServerSetStatus is the status of a GameServerSet

func (*GameServerSetStatus) DeepCopy

func (in *GameServerSetStatus) DeepCopy() *GameServerSetStatus

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

func (*GameServerSetStatus) DeepCopyInto

func (in *GameServerSetStatus) DeepCopyInto(out *GameServerSetStatus)

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

type GameServerSpec

type GameServerSpec struct {
	// Container specifies which Pod container is the game server. Only required if there is more than one
	// container defined
	Container string `json:"container,omitempty"`
	// Ports are the array of ports that can be exposed via the game server
	Ports []GameServerPort `json:"ports"`
	// Health configures health checking
	Health Health `json:"health,omitempty"`
	// Template describes the Pod that will be created for the GameServer
	Template corev1.PodTemplateSpec `json:"template"`
}

GameServerSpec is the spec for a GameServer resource

func (*GameServerSpec) DeepCopy

func (in *GameServerSpec) DeepCopy() *GameServerSpec

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

func (*GameServerSpec) DeepCopyInto

func (in *GameServerSpec) DeepCopyInto(out *GameServerSpec)

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

type GameServerStatus

type GameServerStatus struct {
	// State is the current state of a GameServer, e.g. Creating, Starting, Ready, etc
	State    State                  `json:"state"`
	Ports    []GameServerStatusPort `json:"ports"`
	Address  string                 `json:"address"`
	NodeName string                 `json:"nodeName"`
}

GameServerStatus is the status for a GameServer resource

func (*GameServerStatus) DeepCopy

func (in *GameServerStatus) DeepCopy() *GameServerStatus

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

func (*GameServerStatus) DeepCopyInto

func (in *GameServerStatus) DeepCopyInto(out *GameServerStatus)

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

type GameServerStatusPort added in v0.3.0

type GameServerStatusPort struct {
	Name string `json:"name,omitempty"`
	Port int32  `json:"port"`
}

GameServerStatusPort shows the port that was allocated to a GameServer.

func (*GameServerStatusPort) DeepCopy added in v0.3.0

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

func (*GameServerStatusPort) DeepCopyInto added in v0.3.0

func (in *GameServerStatusPort) DeepCopyInto(out *GameServerStatusPort)

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

type GameServerTemplateSpec

type GameServerTemplateSpec struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              GameServerSpec `json:"spec"`
}

GameServerTemplateSpec is a template for GameServers

func (*GameServerTemplateSpec) DeepCopy

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

func (*GameServerTemplateSpec) DeepCopyInto

func (in *GameServerTemplateSpec) DeepCopyInto(out *GameServerTemplateSpec)

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

type Health

type Health struct {
	// Disabled is whether health checking is disabled or not
	Disabled bool `json:"disabled,omitempty"`
	// PeriodSeconds is the number of seconds each health ping has to occur in
	PeriodSeconds int32 `json:"periodSeconds,omitempty"`
	// FailureThreshold how many failures in a row constitutes unhealthy
	FailureThreshold int32 `json:"failureThreshold,omitempty"`
	// InitialDelaySeconds initial delay before checking health
	InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
}

Health configures health checking on the GameServer

func (*Health) DeepCopy

func (in *Health) DeepCopy() *Health

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

func (*Health) DeepCopyInto

func (in *Health) DeepCopyInto(out *Health)

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

type PortPolicy

type PortPolicy string

PortPolicy is the port policy for the GameServer

type State

type State string

State is the state for the GameServer

Jump to

Keyboard shortcuts

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