v1alpha1

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the mps v1alpha1 API group +kubebuilder:object:generate=true +groupName=mps.playfab.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "mps.playfab.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type BuildMetadataItem

type BuildMetadataItem struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

BuildMetadataItem is a metadata item for a GameServerBuild

func (*BuildMetadataItem) DeepCopy

func (in *BuildMetadataItem) DeepCopy() *BuildMetadataItem

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

func (*BuildMetadataItem) DeepCopyInto

func (in *BuildMetadataItem) DeepCopyInto(out *BuildMetadataItem)

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,omitempty"`
	Status GameServerStatus `json:"status,omitempty"`
}

GameServer is the Schema for the gameservers API

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) SetupWebhookWithManager added in v0.4.0

func (r *GameServer) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*GameServer) ValidateCreate added in v0.4.0

func (r *GameServer) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*GameServer) ValidateDelete added in v0.4.0

func (r *GameServer) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*GameServer) ValidateUpdate added in v0.4.0

func (r *GameServer) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type GameServerBuild

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

	Spec   GameServerBuildSpec   `json:"spec,omitempty"`
	Status GameServerBuildStatus `json:"status,omitempty"`
}

GameServerBuild is the Schema for the gameserverbuilds API

func (*GameServerBuild) DeepCopy

func (in *GameServerBuild) DeepCopy() *GameServerBuild

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

func (*GameServerBuild) DeepCopyInto

func (in *GameServerBuild) DeepCopyInto(out *GameServerBuild)

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

func (*GameServerBuild) DeepCopyObject

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

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

func (*GameServerBuild) SetupWebhookWithManager added in v0.4.0

func (r *GameServerBuild) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*GameServerBuild) ValidateCreate added in v0.4.0

func (r *GameServerBuild) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*GameServerBuild) ValidateDelete added in v0.4.0

func (r *GameServerBuild) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*GameServerBuild) ValidateUpdate added in v0.4.0

func (r *GameServerBuild) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type GameServerBuildHealth

type GameServerBuildHealth string

+kubebuilder:validation:Enum=Healthy;Unhealthy GameServerBuildHealth describes the health of the game server build

const (
	BuildHealthy   GameServerBuildHealth = "Healthy"
	BuildUnhealthy GameServerBuildHealth = "Unhealthy"
)

type GameServerBuildList

type GameServerBuildList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GameServerBuild `json:"items"`
}

GameServerBuildList contains a list of GameServerBuild

func (*GameServerBuildList) DeepCopy

func (in *GameServerBuildList) DeepCopy() *GameServerBuildList

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

func (*GameServerBuildList) DeepCopyInto

func (in *GameServerBuildList) DeepCopyInto(out *GameServerBuildList)

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

func (*GameServerBuildList) DeepCopyObject

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

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

type GameServerBuildSpec

type GameServerBuildSpec struct {

	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Minimum=0
	// StandingBy is the requested number of standingBy servers
	StandingBy int `json:"standingBy"`
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Minimum=0
	// Max is the maximum number of servers in any state
	Max int `json:"max"`

	//+kubebuilder:validation:Required
	// Template describes the pod template specification of the game server
	Template corev1.PodTemplateSpec `json:"template,omitempty"`

	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Format=string
	//+kubebuilder:validation:MinLength=1
	// TitleID is the TitleID this Build belongs to
	TitleID string `json:"titleID"`

	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Format=uuid
	// BuildID is is the BuildID for this Build
	BuildID string `json:"buildID"`

	//+kubebuilder:validation:Required
	// PortsToExpose is an array of ports that will be exposed on the VM
	PortsToExpose []int32 `json:"portsToExpose"`

	//+kubebuilder:validation:Minimum=0
	// CrashesToMarkUnhealthy is the number of crashes needed to mark the build unhealthy
	CrashesToMarkUnhealthy *int `json:"crashesToMarkUnhealthy,omitempty"`

	// BuildMetadata is the metadata for this GameServerBuild
	BuildMetadata []BuildMetadataItem `json:"buildMetadata,omitempty"`
}

GameServerBuildSpec defines the desired state of GameServerBuild

func (*GameServerBuildSpec) DeepCopy

func (in *GameServerBuildSpec) DeepCopy() *GameServerBuildSpec

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

func (*GameServerBuildSpec) DeepCopyInto

func (in *GameServerBuildSpec) DeepCopyInto(out *GameServerBuildSpec)

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

type GameServerBuildStatus

type GameServerBuildStatus struct {
	// CurrentPending is the number of pending servers
	CurrentPending int `json:"currentPending,omitempty"`
	// CurrentInitializing is the number of initializing servers
	CurrentInitializing int `json:"currentInitializing,omitempty"`
	// CurrentStandingBy is the number of standingBy servers
	CurrentStandingBy int `json:"currentStandingBy,omitempty"`
	// CurrentStandingByReadyDesired represents the number of servers that have reached the standingBy state vs the one that is desired
	CurrentStandingByReadyDesired string `json:"currentStandingByReadyDesired,omitempty"`
	// CurrentActive is the number of active servers
	CurrentActive int `json:"currentActive,omitempty"`
	// CrashesCount is the number of crashed servers
	CrashesCount int `json:"crashesCount,omitempty"`
	// Health is the health of the GameServerBuild
	Health GameServerBuildHealth `json:"health,omitempty"`
}

GameServerBuildStatus defines the observed state of GameServerBuild

func (*GameServerBuildStatus) DeepCopy

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

func (*GameServerBuildStatus) DeepCopyInto

func (in *GameServerBuildStatus) DeepCopyInto(out *GameServerBuildStatus)

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

type GameServerDetail

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

	Spec   GameServerDetailSpec   `json:"spec,omitempty"`
	Status GameServerDetailStatus `json:"status,omitempty"`
}

GameServerDetail is the Schema for the gameserverdetails API

func (*GameServerDetail) DeepCopy

func (in *GameServerDetail) DeepCopy() *GameServerDetail

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

func (*GameServerDetail) DeepCopyInto

func (in *GameServerDetail) DeepCopyInto(out *GameServerDetail)

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

func (*GameServerDetail) DeepCopyObject

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

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

type GameServerDetailList

type GameServerDetailList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GameServerDetail `json:"items"`
}

GameServerDetailList contains a list of GameServerDetail

func (*GameServerDetailList) DeepCopy

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

func (*GameServerDetailList) DeepCopyInto

func (in *GameServerDetailList) DeepCopyInto(out *GameServerDetailList)

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

func (*GameServerDetailList) DeepCopyObject

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

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

type GameServerDetailSpec

type GameServerDetailSpec struct {
	ConnectedPlayersCount int      `json:"connectedPlayersCount,omitempty"`
	ConnectedPlayers      []string `json:"connectedPlayers,omitempty"`
}

GameServerDetailSpec defines the desired state of GameServerDetail

func (*GameServerDetailSpec) DeepCopy

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

func (*GameServerDetailSpec) DeepCopyInto

func (in *GameServerDetailSpec) DeepCopyInto(out *GameServerDetailSpec)

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

type GameServerDetailStatus

type GameServerDetailStatus struct {
}

GameServerDetailStatus defines the observed state of GameServerDetail

func (*GameServerDetailStatus) DeepCopy

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

func (*GameServerDetailStatus) DeepCopyInto

func (in *GameServerDetailStatus) DeepCopyInto(out *GameServerDetailStatus)

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

type GameServerHealth

type GameServerHealth string

+kubebuilder:validation:Enum=Healthy;Unhealthy GameServerHealth describes the health of the game server

const (
	GameServerHealthy   GameServerHealth = "Healthy"
	GameServerUnhealthy GameServerHealth = "Unhealthy"
)

type GameServerList

type GameServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GameServer `json:"items"`
}

GameServerList contains a list of GameServer

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 GameServerSpec

type GameServerSpec struct {

	//+kubebuilder:validation:Required
	// Template describes the pod template specification of the game server
	Template corev1.PodTemplateSpec `json:"template"`

	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Format=string
	//+kubebuilder:validation:MinLength=1
	// TitleID is the TitleID this GameServer belongs to
	TitleID string `json:"titleID"`

	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Format=uuid
	// BuildID is the BuildID for this GameServer
	BuildID string `json:"buildID"`

	//+kubebuilder:validation:Required
	// PortsToExpose is an array of ports that will be exposed on the VM
	PortsToExpose []int32 `json:"portsToExpose"`

	// BuildMetadata is the metadata for the GameServerBuild this GameServer belongs to
	BuildMetadata []BuildMetadataItem `json:"buildMetadata,omitempty"`
}

GameServerSpec defines the desired state of GameServer

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 GameServerState

type GameServerState string

+kubebuilder:validation:Enum=Initializing;Active;StandingBy;Crashed;GameCompleted GameServerState describes the state of the game server

const (
	GameServerStateInitializing  GameServerState = "Initializing"
	GameServerStateStandingBy    GameServerState = "StandingBy"
	GameServerStateActive        GameServerState = "Active"
	GameServerStateCrashed       GameServerState = "Crashed"
	GameServerStateGameCompleted GameServerState = "GameCompleted"
)

type GameServerStatus

type GameServerStatus struct {
	// Health defines the health of the game server
	Health GameServerHealth `json:"health,omitempty"`
	// State defines the state of the game server (Initializing, StandingBy, Active etc.)
	State GameServerState `json:"state,omitempty"`
	// PublicIP is the PublicIP of the game server
	PublicIP string `json:"publicIP,omitempty"`
	// Ports is a concatenated list of the ports this game server listens to
	Ports string `json:"ports,omitempty"`
	// SessionID is used during allocation to uniquely identify a game session
	SessionID string `json:"sessionID,omitempty"`
	// SessionCookie is an optional parameter that can be set during allocation. It is passed to the game server process
	SessionCookie string `json:"sessionCookie,omitempty"`
	// InitialPlayers is an optional list of usernames of the initial players that will enter the server. It is used for validation via the game server process
	InitialPlayers []string `json:"initialPlayers,omitempty"`
	// NodeAge is the age in days of the Node (VM) hosting this game server
	NodeAge int `json:"nodeAge,omitempty"`
	// NodeName is the name of the Node (VM) hosting this game server
	NodeName              string       `json:"nodeName,omitempty"`
	ReachedInitializingOn *metav1.Time `json:"ReachedInitializingOn,omitempty"`
	ReachedStandingByOn   *metav1.Time `json:"ReachedStandingByOn,omitempty"`
	ReachedActiveOn       *metav1.Time `json:"ReachedActiveOn,omitempty"`
}

GameServerStatus defines the observed state of GameServer

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.

Jump to

Keyboard shortcuts

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