v1beta1

package
v0.0.1-rc4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the v1beta1 API group +kubebuilder:object:generate=true +groupName=k0smotron.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "k0smotron.io", Version: "v1beta1"}

	// 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

func GetStatefulSetName

func GetStatefulSetName(clusterName string) string

Types

type Cluster

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

	//+kubebuilder:validation:Optional
	//+kubebuilder:default={service:{type:NodePort}}
	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Cluster is the Schema for the k0smotronclusters API

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject

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

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

func (*Cluster) GetAdminConfigSecretName

func (kmc *Cluster) GetAdminConfigSecretName() string

func (*Cluster) GetConfigMapName

func (kmc *Cluster) GetConfigMapName() string

func (*Cluster) GetLoadBalancerName

func (kmc *Cluster) GetLoadBalancerName() string

func (*Cluster) GetNodePortName

func (kmc *Cluster) GetNodePortName() string

func (*Cluster) GetStatefulSetName

func (kmc *Cluster) GetStatefulSetName() string

func (*Cluster) GetVolumeName

func (kmc *Cluster) GetVolumeName() string

type ClusterList

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

ClusterList contains a list of K0smotronCluster

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

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

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

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

func (*ClusterList) DeepCopyObject

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

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

type ClusterRef

type ClusterRef struct {
	// Name of the cluster.
	Name string `json:"name"`
	// Namespace of the cluster.
	Namespace string `json:"namespace"`
}

func (*ClusterRef) DeepCopy

func (in *ClusterRef) DeepCopy() *ClusterRef

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

func (*ClusterRef) DeepCopyInto

func (in *ClusterRef) DeepCopyInto(out *ClusterRef)

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

type ClusterSpec

type ClusterSpec struct {
	// Replicas is the desired number of replicas of the k0s control planes.
	// If unspecified, defaults to 1. If the value is above 1, k0smotron requires kine datasource URL to be set.
	// Recommended value is 3.
	//+kubebuilder:validation:Optional
	//+kubebuilder:default=1
	Replicas int32 `json:"replicas,omitempty"`
	// K0sImage defines the k0s image to be deployed. If empty k0smotron
	// will pick it automatically. Must not include the image tag.
	//+kubebuilder:default=k0sproject/k0s
	K0sImage string `json:"k0sImage,omitempty"`
	// K0sVersion defines the k0s version to be deployed. If empty k0smotron
	// will pick it automatically.
	//+kubebuilder:validation:Optional
	K0sVersion string `json:"k0sVersion,omitempty"`
	// ExternalAddress defines k0s external address. See https://docs.k0sproject.io/stable/configuration/#specapi
	// Will be detected automatically for service type LoadBalancer.
	//+kubebuilder:validation:Optional
	ExternalAddress string `json:"externalAddress,omitempty"`
	// Service defines the service configuration.
	//+kubebuilder:validation:Optional
	//+kubebuilder:default={}
	Service ServiceSpec `json:"service,omitempty"`
	// Persistence defines the persistence configuration. If empty k0smotron
	// will use emptyDir as a volume.
	//+kubebuilder:validation:Optional
	Persistence PersistenceSpec `json:"persistence,omitempty"`
	// KineDataSourceURL defines the kine datasource URL.
	// Required for HA controlplane setup. Must be set if replicas > 1.
	//+kubebuilder:validation:Optional
	KineDataSourceURL string `json:"kineDataSourceURL,omitempty"`
	// CNIPlugin defines the CNI plugin to be used.
	// Possible values are KubeRouter and Calico. Uses KubeRouter by default.
	// Cannot be modified after deploying the cluster.
	//+kubebuilder:default=kuberouter
	//+kubebuilder:validation:Enum:=kuberouter;calico;custom
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cniPlugin is immutable"
	CNIPlugin string `json:"cniPlugin,omitempty"`
}

ClusterSpec defines the desired state of K0smotronCluster

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

type ClusterStatus

type ClusterStatus struct {
	ReconciliationStatus string `json:"reconciliationStatus"`
}

K0smotronClusterStatus defines the observed state of K0smotronCluster

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

type JoinTokenRequest

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

	//+kubebuilder:validation:Optional
	Spec   JoinTokenRequestSpec   `json:"spec,omitempty"`
	Status JoinTokenRequestStatus `json:"status,omitempty"`
}

JoinTokenRequest is the Schema for the join token request API

func (*JoinTokenRequest) DeepCopy

func (in *JoinTokenRequest) DeepCopy() *JoinTokenRequest

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

func (*JoinTokenRequest) DeepCopyInto

func (in *JoinTokenRequest) DeepCopyInto(out *JoinTokenRequest)

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

func (*JoinTokenRequest) DeepCopyObject

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

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

type JoinTokenRequestList

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

JoinTokenRequestList contains a list of K0smotronJoinTokenRequest

func (*JoinTokenRequestList) DeepCopy

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

func (*JoinTokenRequestList) DeepCopyInto

func (in *JoinTokenRequestList) DeepCopyInto(out *JoinTokenRequestList)

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

func (*JoinTokenRequestList) DeepCopyObject

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

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

type JoinTokenRequestSpec

type JoinTokenRequestSpec struct {
	// ClusterRef is the reference to the cluster for which the join token is requested.
	ClusterRef ClusterRef `json:"clusterRef"`
	// Expiration time of the token. Format 1.5h, 2h45m or 300ms.
	//+kubebuilder:validation:Optional
	//+kubebuilder:default="0s"
	Expiry string `json:"expiry,omitempty"`
	// Role of the node for which the token is requested (worker or controller).
	//+kubebuilder:validation:Enum=worker;controller
	//+kubebuilder:default=worker
	Role string `json:"role,omitempty"`
}

JoinTokenRequestSpec defines the desired state of K0smotronJoinTokenRequest

func (*JoinTokenRequestSpec) DeepCopy

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

func (*JoinTokenRequestSpec) DeepCopyInto

func (in *JoinTokenRequestSpec) DeepCopyInto(out *JoinTokenRequestSpec)

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

type JoinTokenRequestStatus

type JoinTokenRequestStatus struct {
	ReconciliationStatus string `json:"reconciliationStatus"`
	TokenID              string `json:"tokenID,omitempty"`
}

JoinTokenRequestStatus defines the observed state of K0smotronJoinTokenRequest

func (*JoinTokenRequestStatus) DeepCopy

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

func (*JoinTokenRequestStatus) DeepCopyInto

func (in *JoinTokenRequestStatus) DeepCopyInto(out *JoinTokenRequestStatus)

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

type PersistenceSpec

type PersistenceSpec struct {
	//+kubebuilder:validation:Enum:emptyDir;hostPath;pvc
	//+kubebuilder:default:=emptyDir
	Type string `json:"type"`
	// PersistentVolumeClaim defines the PVC configuration. Will be used as is in case of .spec.persistence.type is pvc.
	//+kubebuilder:validation:Optional
	PersistentVolumeClaim v1.PersistentVolumeClaim `json:"persistentVolumeClaim,omitempty"`
	// HostPath defines the host path configuration. Will be used as is in case of .spec.persistence.type is hostPath.
	//+kubebuilder:validation:Optional
	HostPath string `json:"hostPath,omitempty"`
}

func (*PersistenceSpec) DeepCopy

func (in *PersistenceSpec) DeepCopy() *PersistenceSpec

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

func (*PersistenceSpec) DeepCopyInto

func (in *PersistenceSpec) DeepCopyInto(out *PersistenceSpec)

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

type ServiceSpec

type ServiceSpec struct {
	//+kubebuilder:validation:Enum=NodePort;LoadBalancer
	//+kubebuilder:default=NodePort
	Type v1.ServiceType `json:"type"`
	// APIPort defines the kubernetes API port. If empty k0smotron
	// will pick it automatically.
	//+kubebuilder:validation:Optional
	//+kubebuilder:default=30443
	APIPort int `json:"apiPort,omitempty"`
	// KonnectivityPort defines the konnectivity port. If empty k0smotron
	// will pick it automatically.
	//+kubebuilder:validation:Optional
	//+kubebuilder:default=30132
	KonnectivityPort int `json:"konnectivityPort,omitempty"`
}

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

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

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

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