v1alpha1

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the lke v1alpha1 API group +kubebuilder:object:generate=true +groupName=lke.anza-labs.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "lke.anza-labs.dev", 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 LKEClusterConfig

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

	Spec   LKEClusterConfigSpec   `json:"spec,omitempty"`
	Status LKEClusterConfigStatus `json:"status,omitempty"`
}

LKEClusterConfig is the Schema for the lkeclusterconfigs API. +kubebuilder:resource:shortName=lkecc +kubebuilder:printcolumn:name=Region,type=string,JSONPath=`.spec.region` +kubebuilder:printcolumn:name=K8sVersion,type=string,JSONPath=`.spec.kubernetesVersion` +kubebuilder:printcolumn:name=Phase,type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name=FailureMessage,type=string,JSONPath=`.status.failureMessage`

func (*LKEClusterConfig) DeepCopy

func (in *LKEClusterConfig) DeepCopy() *LKEClusterConfig

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

func (*LKEClusterConfig) DeepCopyInto

func (in *LKEClusterConfig) DeepCopyInto(out *LKEClusterConfig)

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

func (*LKEClusterConfig) DeepCopyObject

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

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

type LKEClusterConfigList

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

LKEClusterConfigList contains a list of LKEClusterConfig

func (*LKEClusterConfigList) DeepCopy

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

func (*LKEClusterConfigList) DeepCopyInto

func (in *LKEClusterConfigList) DeepCopyInto(out *LKEClusterConfigList)

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

func (*LKEClusterConfigList) DeepCopyObject

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

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

type LKEClusterConfigSpec

type LKEClusterConfigSpec struct {
	// Region is the geographical region where the LKE cluster will be provisioned.
	// +kubebuilder:validation:Required
	Region string `json:"region"`

	// TokenSecretRef references the Kubernetes secret that stores the Linode API token.
	// If not provided, then default token will be used.
	// +kubebuilder:validation:Required
	TokenSecretRef SecretRef `json:"tokenSecretRef"`

	// HighAvailability specifies whether the LKE cluster should be configured for high
	// availability.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=false
	HighAvailability *bool `json:"highAvailability,omitempty"`

	// NodePools contains the specifications for each node pool within the LKE cluster.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinProperties=1
	NodePools map[string]LKENodePool `json:"nodePools"`

	// KubernetesVersion indicates the Kubernetes version of the LKE cluster.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=latest
	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
}

LKEClusterConfigSpec defines the desired state of an LKEClusterConfig resource.

func (*LKEClusterConfigSpec) DeepCopy

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

func (*LKEClusterConfigSpec) DeepCopyInto

func (in *LKEClusterConfigSpec) DeepCopyInto(out *LKEClusterConfigSpec)

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

type LKEClusterConfigStatus

type LKEClusterConfigStatus struct {
	// Phase represents the current phase of the LKE cluster.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=Unknown
	Phase *Phase `json:"phase,omitempty"`

	// ClusterID contains the ID of the provisioned LKE cluster.
	// +kubebuilder:validation:Optional
	ClusterID *int `json:"clusterID,omitempty"`

	// NodePoolStatuses contains the Status of the provisioned node pools within the LKE cluster.
	// +kubebuilder:validation:Optional
	NodePoolStatuses map[string]NodePoolStatus `json:"nodePoolStatuses,omitempty"`

	// FailureMessage contains an optional failure message for the LKE cluster.
	// +kubebuilder:validation:Optional
	FailureMessage *string `json:"failureMessage,omitempty"`
}

LKEClusterConfigStatus defines the observed state of an LKEClusterConfig resource.

func (*LKEClusterConfigStatus) DeepCopy

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

func (*LKEClusterConfigStatus) DeepCopyInto

func (in *LKEClusterConfigStatus) DeepCopyInto(out *LKEClusterConfigStatus)

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

type LKENodePool

type LKENodePool struct {
	// NodeCount specifies the number of nodes in the node pool.
	// +kubebuilder:validation:Required
	NodeCount int `json:"nodeCount"`

	// LinodeType specifies the Linode instance type for the nodes in the pool.
	// +kubebuilder:validation:Required
	LinodeType string `json:"linodeType"`

	// Autoscaler specifies the autoscaling configuration for the node pool.
	// +kubebuilder:validation:Optional
	Autoscaler *LKENodePoolAutoscaler `json:"autoscaler,omitempty"`
}

LKENodePool represents a pool of nodes within the LKE cluster.

func (*LKENodePool) DeepCopy

func (in *LKENodePool) DeepCopy() *LKENodePool

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

func (*LKENodePool) DeepCopyInto

func (in *LKENodePool) DeepCopyInto(out *LKENodePool)

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

func (LKENodePool) IsEqual

func (l LKENodePool) IsEqual(cmp LKENodePool) bool

type LKENodePoolAutoscaler

type LKENodePoolAutoscaler struct {
	// Min specifies the minimum number of nodes in the pool.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	Min int `json:"min"`

	// Max specifies the maximum number of nodes in the pool.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=3
	// +kubebuilder:validation:Maximum=100
	Max int `json:"max"`
}

LKENodePoolAutoscaler represents the autoscaler configuration for a node pool.

func (*LKENodePoolAutoscaler) DeepCopy

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

func (*LKENodePoolAutoscaler) DeepCopyInto

func (in *LKENodePoolAutoscaler) DeepCopyInto(out *LKENodePoolAutoscaler)

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

type NodePoolStatus

type NodePoolStatus struct {
	// ID
	// +kubebuilder:validation:Optional
	ID *int `json:"id,omitempty"`

	// NodePoolDetails
	// +kubebuilder:validation:Required
	NodePoolDetails LKENodePool `json:"details"`
}

NodePoolStatus

func (*NodePoolStatus) DeepCopy

func (in *NodePoolStatus) DeepCopy() *NodePoolStatus

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

func (*NodePoolStatus) DeepCopyInto

func (in *NodePoolStatus) DeepCopyInto(out *NodePoolStatus)

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

func (NodePoolStatus) IsEqual

func (n NodePoolStatus) IsEqual(cmp NodePoolStatus) bool

type Phase

type Phase string

+kubebuilder:validation:Enum=Active;Deleting;Error;Provisioning;Unknown;Updating

const (
	PhaseActive       Phase = "Active"
	PhaseDeleting     Phase = "Deleting"
	PhaseError        Phase = "Error"
	PhaseProvisioning Phase = "Provisioning"
	PhaseUpdating     Phase = "Updating"
	PhaseUnknown      Phase = "Unknown"
)

type SecretRef

type SecretRef struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

SecretRef references a Kubernetes secret.

func (*SecretRef) DeepCopy

func (in *SecretRef) DeepCopy() *SecretRef

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

func (*SecretRef) DeepCopyInto

func (in *SecretRef) DeepCopyInto(out *SecretRef)

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