Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the v1beta1 API group +kubebuilder:object:generate=true +groupName=k0smotron.io
Index ¶
- Variables
- func GetStatefulSetName(clusterName string) string
- type CertificateRef
- type Cluster
- func (in *Cluster) DeepCopy() *Cluster
- func (in *Cluster) DeepCopyInto(out *Cluster)
- func (in *Cluster) DeepCopyObject() runtime.Object
- func (kmc *Cluster) GetAdminConfigSecretName() string
- func (kmc *Cluster) GetConfigMapName() string
- func (kmc *Cluster) GetEntrypointConfigMapName() string
- func (kmc *Cluster) GetLoadBalancerServiceName() string
- func (kmc *Cluster) GetMonitoringConfigMapName() string
- func (kmc *Cluster) GetNodePortServiceName() string
- func (kmc *Cluster) GetServiceName() string
- func (kmc *Cluster) GetStatefulSetName() string
- func (kmc *Cluster) GetVolumeName() string
- type ClusterList
- type ClusterRef
- type ClusterSpec
- type ClusterStatus
- type JoinTokenRequest
- type JoinTokenRequestList
- type JoinTokenRequestSpec
- type JoinTokenRequestStatus
- type ObjectMeta
- type PersistenceSpec
- type PersistentVolumeClaim
- type ServiceSpec
Constants ¶
This section is empty.
Variables ¶
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 ¶
Types ¶
type CertificateRef ¶ added in v0.4.0
type CertificateRef struct { //+kubebuilder:validation:Enum=ca;sa;proxy Type string `json:"type"` //+kubebuilder:validation:Optional Name string `json:"name,omitempty"` }
func (*CertificateRef) DeepCopy ¶ added in v0.4.0
func (in *CertificateRef) DeepCopy() *CertificateRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateRef.
func (*CertificateRef) DeepCopyInto ¶ added in v0.4.0
func (in *CertificateRef) DeepCopyInto(out *CertificateRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cluster) GetAdminConfigSecretName ¶
func (*Cluster) GetConfigMapName ¶
func (*Cluster) GetEntrypointConfigMapName ¶ added in v0.4.0
func (*Cluster) GetLoadBalancerServiceName ¶ added in v0.8.0
func (*Cluster) GetMonitoringConfigMapName ¶ added in v0.5.0
func (*Cluster) GetNodePortServiceName ¶ added in v0.8.0
func (*Cluster) GetServiceName ¶ added in v0.8.0
func (*Cluster) GetStatefulSetName ¶
func (*Cluster) GetVolumeName ¶
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={"type":"ClusterIP","apiPort":30443,"konnectivityPort":30132} 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. // KineDataSourceURL or KineDataSourceSecretName are required for HA controlplane setup // and one of them must be set if replicas > 1. //+kubebuilder:validation:Optional KineDataSourceURL string `json:"kineDataSourceURL,omitempty"` // KineDataSourceSecretName defines the name of kine datasource URL secret. // KineDataSourceURL or KineDataSourceSecretName are required for HA controlplane setup // and one of them must be set if replicas > 1. //+kubebuilder:validation:Optional KineDataSourceSecretName string `json:"kineDataSourceSecretName,omitempty"` // k0sConfig defines the k0s configuration. Note, that some fields will be overwritten by k0smotron. // If empty, will be used default configuration. @see https://docs.k0sproject.io/stable/configuration/ //+kubebuilder:validation:Optional //+kubebuilder:pruning:PreserveUnknownFields K0sConfig *unstructured.Unstructured `json:"k0sConfig,omitempty"` // CertificateRefs defines the certificate references. CertificateRefs []CertificateRef `json:"certificateRefs,omitempty"` // Manifests allows to specify list of volumes with manifests to be // deployed in the cluster. The volumes will be mounted // in /var/lib/k0s/manifests/<manifests.name>, for this reason each // manifest is a stack. K0smotron allows any kind of volume, but the // recommendation is to use secrets and configmaps. // For more information check: // https://docs.k0sproject.io/stable/manifests/ and // https://kubernetes.io/docs/concepts/storage/volumes //+kubebuilder:validation:Optional Manifests []v1.Volume `json:"manifests,omitempty"` // ControlPlaneFlags allows to configure additional flags for k0s // control plane and to override existing ones. The default flags are // kept unless they are overriden explicitly. Flags with arguments must // be specified as a single string, e.g. --some-flag=argument //+kubebuilder:validation:Optional ControlPlaneFlags []string `json:"controllerPlaneFlags,omitempty"` // EnableMonitoring enables prometheus sidecar that scrapes metrics from the child cluster system components and expose // them as usual kubernetes pod metrics. //+kubebuilder:validation:Optional EnableMonitoring bool `json:"enableMonitoring,omitempty"` // Resources describes the compute resource requirements for the control plane pods. Resources v1.ResourceRequirements `json:"resources,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"` Ready bool `json:"ready,omitempty"` }
ClusterStatus 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 ¶
func (in *JoinTokenRequestList) DeepCopy() *JoinTokenRequestList
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 ¶
func (in *JoinTokenRequestSpec) DeepCopy() *JoinTokenRequestSpec
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 ¶
func (in *JoinTokenRequestStatus) DeepCopy() *JoinTokenRequestStatus
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 ObjectMeta ¶ added in v0.7.2
type ObjectMeta struct { // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` // +optional Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` // +optional // +patchStrategy=merge Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` }
func (*ObjectMeta) DeepCopy ¶ added in v0.7.2
func (in *ObjectMeta) DeepCopy() *ObjectMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.
func (*ObjectMeta) DeepCopyInto ¶ added in v0.7.2
func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)
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 *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 PersistentVolumeClaim ¶ added in v0.7.2
type PersistentVolumeClaim struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec defines the desired characteristics of a volume requested by a pod author. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional Spec v1.PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // status represents the current information/status of a persistent volume claim. // Read-only. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional Status v1.PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
PersistentVolumeClaim is a user's request for and claim to a persistent volume
func (*PersistentVolumeClaim) DeepCopy ¶ added in v0.7.2
func (in *PersistentVolumeClaim) DeepCopy() *PersistentVolumeClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaim.
func (*PersistentVolumeClaim) DeepCopyInto ¶ added in v0.7.2
func (in *PersistentVolumeClaim) DeepCopyInto(out *PersistentVolumeClaim)
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=ClusterIP;NodePort;LoadBalancer //+kubebuilder:default=ClusterIP 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"` // Annotations defines extra annotations to be added to the service. //+kubebuilder:validation:Optional Annotations map[string]string `json:"annotations,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.