v1alpha1

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Overview

Package v1alpha contains API Schema definitions for the polaris v1 API group.

+kubebuilder:object:generate=true +groupName=polaris.ricochet

Package v1alpha1 contains API Schema definitions for the polaris v1alpha1 API group +kubebuilder:object:generate=true +groupName=polaris.ricochet

Index

Constants

This section is empty.

Variables

View Source
var (

	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: apis.GroupName, Version: "v1alpha1"}

	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: apis.GroupName, 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 Game

type Game struct {
	// The name of the game type to be created.
	Name string `json:"name"`

	// The version of the game to be used.
	//
	// +kubebuilder:default:=latest
	// +optional
	Version string `json:"version"`

	// The software used to load mods into the game server.
	// Vanilla will launch the game server as default without any mods.
	//
	// +kubebuilder:default:=vanilla
	// +optional
	ModLoader string `json:"modLoader"`
}

Game defines the game and modloader to be used for the server.

func (*Game) DeepCopy

func (in *Game) DeepCopy() *Game

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

func (*Game) DeepCopyInto

func (in *Game) DeepCopyInto(out *Game)

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

type Network

type Network struct {
	// The type of network to be used for the server.
	//
	// +optional
	Type NetworkType `json:"type"`

	// The IP address of the server.
	//
	// +optional
	Address string `json:"address"`
}

Network defines the network configuration for the server.

This defines how the user can connect to the server.

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

type NetworkType

type NetworkType string

NetworkType defines the type of network to be used for the server. Only one of the following network types may be specified. If none of the following types is specified, the default one is PrivateNetwork. +kubebuilder:validation:Enum=public;private +kubebuilder:default:=private

const (
	// PublicNetwork will expose the server over a randomly generated external IP.
	PublicNetwork NetworkType = "public"

	// PrivateNetwork will create a Tailscale vpn sidecar and not expose an IP.
	PrivateNetwork NetworkType = "private"
)

type Server

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

	Spec   ServerSpec   `json:"spec,omitempty"`
	Status ServerStatus `json:"status,omitempty"`
}

Server is the Schema for the servers API

func (*Server) DeepCopy

func (in *Server) DeepCopy() *Server

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

func (*Server) DeepCopyInto

func (in *Server) DeepCopyInto(out *Server)

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

func (*Server) DeepCopyObject

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

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

type ServerList

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

ServerList contains a list of Server

func (*ServerList) DeepCopy

func (in *ServerList) DeepCopy() *ServerList

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

func (*ServerList) DeepCopyInto

func (in *ServerList) DeepCopyInto(out *ServerList)

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

func (*ServerList) DeepCopyObject

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

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

type ServerSpec

type ServerSpec struct {
	// The unique identifier of the game server instance.
	Id string `json:"id"`

	// This changes the resources given to the server and the player limit.
	// Valid values are: xs, s, m, l, xl
	//
	// +kubebuilder:validation:Enum:=xs;s;m;l;xl
	// +kubebuilder:default:=xs
	// +optional
	Size string `json:"size"`

	// The name of the server.
	//
	// +kubebuilder:default:=Hyperborea
	// +optional
	Name string `json:"name"`

	// The game and modloader to be used for the server.
	Game Game `json:"game"`

	// The network configuration for the server.
	//
	// +optional
	Network Network `json:"network"`
}

ServerSpec defines the desired state of the server.

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

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

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

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

type ServerState

type ServerState string

ServerState defines the current operating condition of the server. Only one of the following states may be specified. +kubebuilder:validation:Enum=provisioning;starting;running;stopping;stopped;deleting;failed;""

const (
	ServerStateProvisioning ServerState = "provisioning"
	ServerStateStarting     ServerState = "starting"
	ServerStateRunning      ServerState = "running"
	ServerStateStopping     ServerState = "stopping"
	ServerStateStopped      ServerState = "stopped"
	ServerStateDeleting     ServerState = "deleting"
	ServerStateFailed       ServerState = "failed"
	ServerStateUnknown      ServerState = ""
)

type ServerStatus

type ServerStatus struct {
	State ServerState `json:"state"`
}

ServerStatus defines the observed state of Server

func (*ServerStatus) DeepCopy

func (in *ServerStatus) DeepCopy() *ServerStatus

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

func (*ServerStatus) DeepCopyInto

func (in *ServerStatus) DeepCopyInto(out *ServerStatus)

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