v1alpha1

package
v0.5.1-b3f3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the claim v1alpha1 API group +kubebuilder:object:generate=true +groupName=claim.tmax.io

Index

Constants

View Source
const (
	// 클러스터 클레임이 생성되고, 관리자의 승인/거절을 기다리는 상태
	ClusterClaimPhaseAwaiting = ClusterClaimPhase("Awaiting")
	// 관리자에 의해 클레임이 승인된 상태
	ClusterClaimPhaseApproved = ClusterClaimPhase("Approved")
	// 관리자에 의헤 클레임이 거절된 상태
	ClusterClaimPhaseRejected = ClusterClaimPhase("Rejected")
	// 클러스터가 삭제된 상태
	ClusterClaimPhaseClusterDeleted = ClusterClaimPhase("Cluster Deleted")
	// 클러스터 생성과정에서 에러가 발생한 상태
	ClusterClaimPhaseError = ClusterClaimPhase("Error")
)
View Source
const (
	// 클러스터 업데이트 클레임이 생성되고, 관리자의 승인/거절을 기다리는 상태
	ClusterUpdateClaimPhaseAwaiting = ClusterUpdateClaimPhase("Awaiting")
	// 관리자에 의해 클레임이 승인된 상태
	ClusterUpdateClaimPhaseApproved = ClusterUpdateClaimPhase("Approved")
	// 관리자에 의해 클레임이 거절된 상태
	ClusterUpdateClaimPhaseRejected = ClusterUpdateClaimPhase("Rejected")
	// 클러스터 업데이트 과정에서 에러가 발생한 상태
	ClusterUpdateClaimPhaseError = ClusterUpdateClaimPhase("Error")
)
View Source
const (
	ClusterUpdateClaimReasonClusterNotFound   = ClusterUpdateClaimReason("Cluster not found")
	ClusterUpdateClaimReasonClusterIsDeleting = ClusterUpdateClaimReason("Cluster is deleting")
	ClusterUpdateClaimReasonAdminApproved     = ClusterUpdateClaimReason("Admin approved")
	ClusterUpdateClaimReasonAdminAwaiting     = ClusterUpdateClaimReason("Waiting for admin approval")
	ClusterUpdateClaimReasonConcurruencyError = ClusterUpdateClaimReason("The number of nodes at the time of creation of the clusterupdataclaim differs from the current number of nodes.")
	ClusterUpdateClaimReasonInvalidCluster    = ClusterUpdateClaimReason("Cluster type is not created type")
)
View Source
const (
	ClusterClaimDeprecatedPhaseClusterDeleted = ClusterClaimPhase("ClusterDeleted")
)
View Source
const (
	ClusterUpdateTypeNodeScale = ClusterUpdateType("NodeScale")
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "claim.tmax.io", 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
)
View Source
var ClusterClaimWebhookLogger = logf.Log.WithName("clusterclaim-resource")

log is for logging in this package.

View Source
var ClusterUpdateClaimWebhookLogger = logf.Log.WithName("clusterupdateclaim-resource")

log is for logging in this package.

Functions

This section is empty.

Types

type AwsClaimSpec

type AwsClaimSpec struct {
	// The ssh key info to access VM.
	SshKey string `json:"sshKey,omitempty"`
	// +kubebuilder:validation:Enum:=ap-northeast-1;ap-northeast-2;ap-south-1;ap-southeast-1;ap-northeast-2;ca-central-1;eu-central-1;eu-west-1;eu-west-2;eu-west-3;sa-east-1;us-east-1;us-east-2;us-west-1;us-west-2
	// The region where VM is working. Defaults to ap-northeast-2.
	Region string `json:"region,omitempty"`
	// The type of VM for master node. Defaults to t3.medium. See: https://aws.amazon.com/ec2/instance-types
	MasterType string `json:"masterType,omitempty"`
	// +kubebuilder:validation:Minimum:=8
	// The disk size of VM for master node. Defaults to 20.
	MasterDiskSize int `json:"masterDiskSize,omitempty"`
	// The type of VM for worker node. Defaults to t3.medium. See: https://aws.amazon.com/ec2/instance-types
	WorkerType string `json:"workerType,omitempty"`
	// +kubebuilder:validation:Minimum:=8
	// The disk size of VM for worker node. Defaults to 20.
	WorkerDiskSize int `json:"workerDiskSize,omitempty"`
}

func (*AwsClaimSpec) DeepCopy

func (in *AwsClaimSpec) DeepCopy() *AwsClaimSpec

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

func (*AwsClaimSpec) DeepCopyInto

func (in *AwsClaimSpec) DeepCopyInto(out *AwsClaimSpec)

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

type ClusterClaim

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

	Spec   ClusterClaimSpec   `json:"spec"`
	Status ClusterClaimStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=clusterclaims,shortName=cc,scope=Namespaced +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.reason` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" ClusterClaim is the Schema for the clusterclaims API

func (*ClusterClaim) DeepCopy

func (in *ClusterClaim) DeepCopy() *ClusterClaim

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

func (*ClusterClaim) DeepCopyInto

func (in *ClusterClaim) DeepCopyInto(out *ClusterClaim)

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

func (*ClusterClaim) DeepCopyObject

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

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

func (*ClusterClaim) Default

func (r *ClusterClaim) Default()

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

func (*ClusterClaim) GetClusterManagerNamespacedName

func (c *ClusterClaim) GetClusterManagerNamespacedName() types.NamespacedName

func (*ClusterClaim) GetNamespacedName

func (c *ClusterClaim) GetNamespacedName() types.NamespacedName

func (*ClusterClaim) SetupWebhookWithManager

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

func (*ClusterClaim) ValidateCreate

func (r *ClusterClaim) ValidateCreate() error

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

func (*ClusterClaim) ValidateDelete

func (r *ClusterClaim) ValidateDelete() error

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

func (*ClusterClaim) ValidateUpdate

func (r *ClusterClaim) ValidateUpdate(old runtime.Object) error

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

type ClusterClaimList

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

+kubebuilder:object:root=true ClusterClaimList contains a list of ClusterClaim

func (*ClusterClaimList) DeepCopy

func (in *ClusterClaimList) DeepCopy() *ClusterClaimList

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

func (*ClusterClaimList) DeepCopyInto

func (in *ClusterClaimList) DeepCopyInto(out *ClusterClaimList)

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

func (*ClusterClaimList) DeepCopyObject

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

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

type ClusterClaimPhase

type ClusterClaimPhase string

type ClusterClaimSpec

type ClusterClaimSpec struct {
	// +kubebuilder:validation:Required
	// The name of the cluster to be created.
	ClusterName string `json:"clusterName"`
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=^v[0-9].[0-9]+.[0-9]+
	// The version of kubernetes. Example: v1.19.6
	Version string `json:"version"`
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum:=AWS;vSphere
	// The type of provider.
	Provider string `json:"provider"`
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum:=1
	// The number of master node. Example: 3
	MasterNum int `json:"masterNum"`
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum:=1
	// The number of worker node. Example: 2
	WorkerNum int `json:"workerNum"`
	// Provider Aws Spec.
	ProviderAwsSpec AwsClaimSpec `json:"providerAwsSpec,omitempty"`
	// Provider vSphere Spec.
	ProviderVsphereSpec VsphereClaimSpec `json:"providerVsphereSpec,omitempty"`
}

ClusterClaimSpec defines the desired state of ClusterClaim

func (*ClusterClaimSpec) DeepCopy

func (in *ClusterClaimSpec) DeepCopy() *ClusterClaimSpec

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

func (*ClusterClaimSpec) DeepCopyInto

func (in *ClusterClaimSpec) DeepCopyInto(out *ClusterClaimSpec)

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

type ClusterClaimStatus

type ClusterClaimStatus struct {
	Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
	Reason  string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`

	// +kubebuilder:validation:Enum=Awaiting;Admitted;Approved;Rejected;Error;ClusterDeleted;Cluster Deleted;
	Phase ClusterClaimPhase `json:"phase,omitempty" protobuf:"bytes,4,opt,name=phase"`
}

ClusterClaimStatus defines the observed state of ClusterClaim

func (*ClusterClaimStatus) DeepCopy

func (in *ClusterClaimStatus) DeepCopy() *ClusterClaimStatus

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

func (*ClusterClaimStatus) DeepCopyInto

func (in *ClusterClaimStatus) DeepCopyInto(out *ClusterClaimStatus)

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

func (*ClusterClaimStatus) SetReason

func (c *ClusterClaimStatus) SetReason(r string)

func (*ClusterClaimStatus) SetTypedPhase

func (c *ClusterClaimStatus) SetTypedPhase(p ClusterClaimPhase)

type ClusterUpdateClaim

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

	Spec   ClusterUpdateClaimSpec   `json:"spec,omitempty"`
	Status ClusterUpdateClaimStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=clusterupdateclaims,shortName=cuc,scope=Namespaced +kubebuilder:printcolumn:name="Cluster",type=string,JSONPath=`.spec.clusterName` +kubebuilder:printcolumn:name="masternum",type=integer,JSONPath=`.spec.updatedMasterNum` +kubebuilder:printcolumn:name="workernum",type=integer,JSONPath=`.spec.updatedWorkerNum` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.reason` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" ClusterUpdateClaim is the Schema for the clusterupdateclaims API

func (*ClusterUpdateClaim) DeepCopy

func (in *ClusterUpdateClaim) DeepCopy() *ClusterUpdateClaim

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

func (*ClusterUpdateClaim) DeepCopyInto

func (in *ClusterUpdateClaim) DeepCopyInto(out *ClusterUpdateClaim)

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

func (*ClusterUpdateClaim) DeepCopyObject

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

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

func (*ClusterUpdateClaim) GetClusterNamespacedName

func (c *ClusterUpdateClaim) GetClusterNamespacedName() types.NamespacedName

func (*ClusterUpdateClaim) GetNamespacedName

func (c *ClusterUpdateClaim) GetNamespacedName() types.NamespacedName

func (*ClusterUpdateClaim) IsPhaseApproved

func (c *ClusterUpdateClaim) IsPhaseApproved() bool

func (*ClusterUpdateClaim) IsPhaseAwaiting

func (c *ClusterUpdateClaim) IsPhaseAwaiting() bool

func (*ClusterUpdateClaim) IsPhaseEmpty

func (c *ClusterUpdateClaim) IsPhaseEmpty() bool

func (*ClusterUpdateClaim) IsPhaseError

func (c *ClusterUpdateClaim) IsPhaseError() bool

func (*ClusterUpdateClaim) IsPhaseRejected

func (c *ClusterUpdateClaim) IsPhaseRejected() bool

func (*ClusterUpdateClaim) SetupWebhookWithManager

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

func (*ClusterUpdateClaim) ValidateCreate

func (r *ClusterUpdateClaim) ValidateCreate() error

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

func (*ClusterUpdateClaim) ValidateDelete

func (r *ClusterUpdateClaim) ValidateDelete() error

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

func (*ClusterUpdateClaim) ValidateUpdate

func (r *ClusterUpdateClaim) ValidateUpdate(old runtime.Object) error

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

type ClusterUpdateClaimList

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

ClusterUpdateClaimList contains a list of ClusterUpdateClaim

func (*ClusterUpdateClaimList) DeepCopy

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

func (*ClusterUpdateClaimList) DeepCopyInto

func (in *ClusterUpdateClaimList) DeepCopyInto(out *ClusterUpdateClaimList)

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

func (*ClusterUpdateClaimList) DeepCopyObject

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

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

type ClusterUpdateClaimPhase

type ClusterUpdateClaimPhase string

type ClusterUpdateClaimReason

type ClusterUpdateClaimReason string

type ClusterUpdateClaimSpec

type ClusterUpdateClaimSpec struct {
	// +kubebuilder:validation:Required
	// Cluster name created using clusterclaim.
	ClusterName string `json:"clusterName"`
	// +kubebuilder:validation:Minimum:=1
	// The number of master nodes to update.
	UpdatedMasterNum int `json:"updatedMasterNum,omitempty"`
	// +kubebuilder:validation:Minimum:=1
	// The number of worker nodes to update.
	UpdatedWorkerNum int `json:"updatedWorkerNum,omitempty"`
}

ClusterUpdateClaimSpec defines the desired state of ClusterUpdateClaim

func (*ClusterUpdateClaimSpec) DeepCopy

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

func (*ClusterUpdateClaimSpec) DeepCopyInto

func (in *ClusterUpdateClaimSpec) DeepCopyInto(out *ClusterUpdateClaimSpec)

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

type ClusterUpdateClaimStatus

type ClusterUpdateClaimStatus struct {
	// Reason of the phase.
	Reason ClusterUpdateClaimReason `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`

	// +kubebuilder:validation:Enum=Awaiting;Approved;Rejected;Error;Cluster Deleted;
	// Phase of the clusterupdateclaim.
	Phase ClusterUpdateClaimPhase `json:"phase,omitempty" protobuf:"bytes,4,opt,name=phase"`

	// The number of current master node.
	CurrentMasterNum int `json:"currentMasterNum,omitempty"`
	// The number of current worker node.
	CurrentWorkerNum int `json:"currentWorkerNum,omitempty"`
}

ClusterUpdateClaimStatus defines the observed state of ClusterUpdateClaim

func (*ClusterUpdateClaimStatus) DeepCopy

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

func (*ClusterUpdateClaimStatus) DeepCopyInto

func (in *ClusterUpdateClaimStatus) DeepCopyInto(out *ClusterUpdateClaimStatus)

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

func (*ClusterUpdateClaimStatus) SetTypedPhase

func (*ClusterUpdateClaimStatus) SetTypedReason

type ClusterUpdateType

type ClusterUpdateType string

type VsphereClaimSpec

type VsphereClaimSpec struct {
	// The internal IP address cidr block for pods. Defaults to 10.0.0.0/16.
	// +kubebuilder:validation:Pattern:=^[0-9]+.[0-9]+.[0-9]+.[0-9]+\/[0-9]+
	PodCidr string `json:"podCidr,omitempty"`
	// The IP address of vCenter Server Application(VCSA).
	VcenterIp string `json:"vcenterIp,omitempty"`
	// The TLS thumbprint of machine certificate. Example: F881E17883D123700CAE0B14F7DA75DE8F3287D1
	VcenterThumbprint string `json:"vcenterThumbprint,omitempty"`
	// The name of network. Defaults to VM Network.
	VcenterNetwork string `json:"vcenterNetwork,omitempty"`
	// The name of datacenter.
	VcenterDataCenter string `json:"vcenterDataCenter,omitempty"`
	// The name of datastore.
	VcenterDataStore string `json:"vcenterDataStore,omitempty"`
	// The name of folder. Defaults to vm.
	VcenterFolder string `json:"vcenterFolder,omitempty"`
	// The name of resource pool. Example: 192.168.9.30/Resources
	VcenterResourcePool string `json:"vcenterResourcePool,omitempty"`
	// The IP address of control plane for remote cluster(vip).
	VcenterKcpIp string `json:"vcenterKcpIp,omitempty"`
	// +kubebuilder:validation:Minimum:=2
	// The number of cpus for vm. Defaults to 2.
	VcenterCpuNum int `json:"vcenterCpuNum,omitempty"`
	// +kubebuilder:validation:Minimum:=2048
	// The memory size for vm, write as MB without unit. Defaults to 4096.
	VcenterMemSize int `json:"vcenterMemSize,omitempty"`
	// +kubebuilder:validation:Minimum:=20
	// The disk size for vm, write as GB without unit. Defaults to 20.
	VcenterDiskSize int `json:"vcenterDiskSize,omitempty"`
	// The template name to use in vsphere.
	VcenterTemplate string `json:"vcenterTemplate,omitempty"`
	// The root user password for virtual machine. Defaults to random.
	VMPassword string `json:"vmPassword,omitempty"`
}

func (*VsphereClaimSpec) DeepCopy

func (in *VsphereClaimSpec) DeepCopy() *VsphereClaimSpec

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

func (*VsphereClaimSpec) DeepCopyInto

func (in *VsphereClaimSpec) DeepCopyInto(out *VsphereClaimSpec)

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