v1alpha1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "mcing.kmdkuk.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 Minecraft

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

	Spec   MinecraftSpec   `json:"spec,omitempty"`
	Status MinecraftStatus `json:"status,omitempty"`
}

Minecraft is the Schema for the minecrafts API

func (*Minecraft) DeepCopy

func (in *Minecraft) DeepCopy() *Minecraft

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

func (*Minecraft) DeepCopyInto

func (in *Minecraft) DeepCopyInto(out *Minecraft)

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

func (*Minecraft) DeepCopyObject

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

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

func (*Minecraft) Default

func (r *Minecraft) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Minecraft) HeadlessServiceName added in v0.2.0

func (m *Minecraft) HeadlessServiceName() string

func (*Minecraft) PodName added in v0.4.0

func (m *Minecraft) PodName() string

func (*Minecraft) PrefixedName added in v0.2.0

func (m *Minecraft) PrefixedName() string

func (*Minecraft) SetupWebhookWithManager

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

SetupWebhookWithManager will setup the manager to manage the webhooks

func (*Minecraft) ValidateCreate

func (r *Minecraft) ValidateCreate() (admission.Warnings, error)

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

func (*Minecraft) ValidateDelete

func (r *Minecraft) ValidateDelete() (admission.Warnings, error)

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

func (*Minecraft) ValidateUpdate

func (r *Minecraft) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

type MinecraftList

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

MinecraftList contains a list of Minecraft

func (*MinecraftList) DeepCopy

func (in *MinecraftList) DeepCopy() *MinecraftList

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

func (*MinecraftList) DeepCopyInto

func (in *MinecraftList) DeepCopyInto(out *MinecraftList)

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

func (*MinecraftList) DeepCopyObject

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

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

type MinecraftSpec

type MinecraftSpec struct {

	// PodTemplate is a `Pod` template for Minecraft server container.
	PodTemplate PodTemplateSpec `json:"podTemplate"`

	// PersistentVolumeClaimSpec is a specification of `PersistentVolumeClaim` for persisting data in minecraft.
	// A claim named "minecraft-data" must be included in the list.
	// +kubebuilder:validation:MinItems=1
	VolumeClaimTemplates []PersistentVolumeClaim `json:"volumeClaimTemplates"`

	// ServiceTemplate is a `Service` template.
	// +optional
	ServiceTemplate *ServiceTemplate `json:"serviceTemplate,omitempty"`

	// operators on server. exec /op or /deop
	// +optional
	Ops Ops `json:"ops,omitempty"`

	// whitelist
	Whitelist Whitelist `json:"whitelist,omitempty"`

	// ServerPropertiesConfigMapName is a `ConfigMap` name of `server.properties`.
	// +nullable
	// +optional
	ServerPropertiesConfigMapName *string `json:"serverPropertiesConfigMapName,omitempty"`

	// OtherConfigMapName is a `ConfigMap` name of other configurations file(eg. banned-ips.json, ops.json etc)
	// +nullable
	// +optional
	OtherConfigMapName *string `json:"otherConfigMapName,omitempty"`
}

MinecraftSpec defines the desired state of Minecraft

func (*MinecraftSpec) DeepCopy

func (in *MinecraftSpec) DeepCopy() *MinecraftSpec

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

func (*MinecraftSpec) DeepCopyInto

func (in *MinecraftSpec) DeepCopyInto(out *MinecraftSpec)

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

type MinecraftStatus

type MinecraftStatus struct {
}

MinecraftStatus defines the observed state of Minecraft

func (*MinecraftStatus) DeepCopy

func (in *MinecraftStatus) DeepCopy() *MinecraftStatus

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

func (*MinecraftStatus) DeepCopyInto

func (in *MinecraftStatus) DeepCopyInto(out *MinecraftStatus)

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

type ObjectMeta added in v0.2.0

type ObjectMeta struct {
	// Name is the name of the object.
	// +optional
	Name string `json:"name,omitempty"`

	// Labels is a map of string keys and values.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations is a map of string keys and values.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

ObjectMeta is metadata of objects. This is partially copied from metav1.ObjectMeta.

func (*ObjectMeta) DeepCopy added in v0.2.0

func (in *ObjectMeta) DeepCopy() *ObjectMeta

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

func (*ObjectMeta) DeepCopyInto added in v0.2.0

func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)

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

type Ops added in v0.4.0

type Ops struct {
	// user name exec /op or /deop
	// +optional
	Users []string `json:"users,omitempty"`
}

func (*Ops) DeepCopy added in v0.4.0

func (in *Ops) DeepCopy() *Ops

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

func (*Ops) DeepCopyInto added in v0.4.0

func (in *Ops) DeepCopyInto(out *Ops)

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

type PersistentVolumeClaim added in v0.2.0

type PersistentVolumeClaim struct {
	// Standard object's metadata.
	ObjectMeta `json:"metadata"`

	// Spec defines the desired characteristics of a volume requested by a pod author.
	Spec corev1.PersistentVolumeClaimSpec `json:"spec"`
}

PersistentVolumeClaim is a user's request for and claim to a persistent volume. This is slightly modified from corev1.PersistentVolumeClaim.

func (*PersistentVolumeClaim) DeepCopy added in v0.2.0

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

func (*PersistentVolumeClaim) DeepCopyInto added in v0.2.0

func (in *PersistentVolumeClaim) DeepCopyInto(out *PersistentVolumeClaim)

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

func (PersistentVolumeClaim) ToCoreV1 added in v0.2.0

type PodTemplateSpec added in v0.2.0

type PodTemplateSpec struct {
	// Standard object's metadata.  The name in this metadata is ignored.
	// +optional
	ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the pod.
	// The name of the MySQL server container in this spec must be `minecraft`.
	Spec corev1.PodSpec `json:"spec"`
}

PodTemplateSpec describes the data a pod should have when created from a template. This is slightly modified from corev1.PodTemplateSpec.

func (*PodTemplateSpec) DeepCopy added in v0.2.0

func (in *PodTemplateSpec) DeepCopy() *PodTemplateSpec

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

func (*PodTemplateSpec) DeepCopyInto added in v0.2.0

func (in *PodTemplateSpec) DeepCopyInto(out *PodTemplateSpec)

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

func (*PodTemplateSpec) ToCoreV1 added in v0.2.0

func (p *PodTemplateSpec) ToCoreV1() corev1.PodTemplateSpec

type ServiceTemplate added in v0.2.0

type ServiceTemplate struct {
	// Standard object's metadata. Only `annotations` and `labels` are valid.
	// +optional
	ObjectMeta `json:"metadata,omitempty"`

	// Spec is the ServiceSpec
	// +optional
	Spec *corev1.ServiceSpec `json:"spec,omitempty"`
}

ServiceTemplate define the desired spec and annotations of Service

func (*ServiceTemplate) DeepCopy added in v0.2.0

func (in *ServiceTemplate) DeepCopy() *ServiceTemplate

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

func (*ServiceTemplate) DeepCopyInto added in v0.2.0

func (in *ServiceTemplate) DeepCopyInto(out *ServiceTemplate)

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

type Whitelist added in v0.4.0

type Whitelist struct {
	// exec /whitelist on
	Enabled bool `json:"enabled"`

	// user name exec /whitelist add or /whitelist remove
	// +optional
	Users []string `json:"users,omitempty"`
}

func (*Whitelist) DeepCopy added in v0.4.0

func (in *Whitelist) DeepCopy() *Whitelist

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

func (*Whitelist) DeepCopyInto added in v0.4.0

func (in *Whitelist) DeepCopyInto(out *Whitelist)

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