Documentation ¶
Overview ¶
Package v1alpha contains API Schema definitions for the polaris v1 API group.
+k8s:openapi-gen=true +kubebuilder:object:generate=true +groupName=polaris.ricochet
Index ¶
Constants ¶
const GroupName = "polaris.ricochet"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Deprecated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Resource ¶ added in v0.3.2
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Game.
func (*Game) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Server.
func (*Server) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Server) DeepCopyObject ¶
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.