v1alpha1

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// ClusterManagerPhasePending is the first state a Cluster is assigned by
	// Cluster API Cluster controller after being created.
	ClusterManagerPhasePending = ClusterManagerPhase("Pending")

	// ClusterManagerPhaseProvisioning is the state when the Cluster has a provider infrastructure
	// object associated and can start provisioning.
	ClusterManagerPhaseProvisioning = ClusterManagerPhase("Provisioning")

	// object associated and can start provisioning.
	ClusterManagerPhaseRegistering = ClusterManagerPhase("Registering")

	// ClusterManagerPhaseProvisioned is the state when its
	// infrastructure has been created and configured.
	ClusterManagerPhaseProvisioned = ClusterManagerPhase("Provisioned")

	// infrastructure has been created and configured.
	ClusterManagerPhaseRegistered = ClusterManagerPhase("Registered")

	// ClusterManagerPhaseDeleting is the Cluster state when a delete
	// request has been sent to the API Server,
	// but its infrastructure has not yet been fully deleted.
	ClusterManagerPhaseDeleting = ClusterManagerPhase("Deleting")

	// ClusterManagerPhaseFailed is the Cluster state when the system
	// might require user intervention.
	ClusterManagerPhaseFailed = ClusterManagerPhase("Failed")

	// ClusterManagerPhaseUnknown is returned if the Cluster state cannot be determined.
	ClusterManagerPhaseUnknown = ClusterManagerPhase("Unknown")
)
View Source
const (
	// ClusterRegistrationPhasePending is the first state a Cluster is assigned by
	// Cluster API Cluster controller after being created.
	ClusterRegistrationPhasePending = ClusterRegistrationPhase("Pending")

	// ClusterRegistrationPhaseProvisioning is the state when the Cluster has a provider infrastructure
	// object associated and can start provisioning.
	ClusterRegistrationPhaseProvisioning = ClusterRegistrationPhase("Provisioning")

	ClusterRegistrationPhaseSuccess = ClusterRegistrationPhase("Success")

	// ClusterRegistrationPhaseProvisioned is the state when its
	// infrastructure has been created and configured.
	ClusterRegistrationPhaseProvisioned = ClusterRegistrationPhase("Provisioned")

	// ClusterRegistrationPhaseDeleting is the Cluster state when a delete
	// request has been sent to the API Server,
	// but its infrastructure has not yet been fully deleted.
	ClusterRegistrationPhaseDeleting = ClusterRegistrationPhase("Deleting")

	// ClusterRegistrationPhaseFailed is the Cluster state when the system
	// might require user intervention.
	ClusterRegistrationPhaseFailed = ClusterRegistrationPhase("Failed")

	// ClusterRegistrationPhaseUnknown is returned if the Cluster state cannot be determined.
	ClusterRegistrationPhaseUnknown = ClusterRegistrationPhase("Unknown")
)

Variables

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

Functions

This section is empty.

Types

type ClusterManager

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

	Spec        ClusterManagerSpec   `json:"spec,omitempty"`
	AwsSpec     ProviderAwsSpec      `json:"awsSpec,omitempty"`
	VsphereSpec ProviderVsphereSpec  `json:"vsphereSpec,omitempty"`
	Status      ClusterManagerStatus `json:"status,omitempty"`
}

ClusterManager is the Schema for the clustermanagers API

func (*ClusterManager) DeepCopy

func (in *ClusterManager) DeepCopy() *ClusterManager

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

func (*ClusterManager) DeepCopyInto

func (in *ClusterManager) DeepCopyInto(out *ClusterManager)

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

func (*ClusterManager) DeepCopyObject

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

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

func (*ClusterManager) SetupWebhookWithManager

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

func (*ClusterManager) ValidateCreate

func (r *ClusterManager) ValidateCreate() error

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

func (*ClusterManager) ValidateDelete

func (r *ClusterManager) ValidateDelete() error

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

func (*ClusterManager) ValidateUpdate

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

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

type ClusterManagerList

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

ClusterManagerList contains a list of ClusterManager

func (*ClusterManagerList) DeepCopy

func (in *ClusterManagerList) DeepCopy() *ClusterManagerList

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

func (*ClusterManagerList) DeepCopyInto

func (in *ClusterManagerList) DeepCopyInto(out *ClusterManagerList)

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

func (*ClusterManagerList) DeepCopyObject

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

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

type ClusterManagerPhase

type ClusterManagerPhase string

type ClusterManagerSpec

type ClusterManagerSpec struct {
	// The name of cloud provider where VM is created
	Provider string `json:"provider,omitempty"`
	// The version of kubernetes
	Version string `json:"version,omitempty"`
	// The number of master node
	MasterNum int `json:"masterNum,omitempty"`
	// The number of worker node
	WorkerNum int `json:"workerNum,omitempty"`
}

ClusterManagerSpec defines the desired state of ClusterManager

func (*ClusterManagerSpec) DeepCopy

func (in *ClusterManagerSpec) DeepCopy() *ClusterManagerSpec

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

func (*ClusterManagerSpec) DeepCopyInto

func (in *ClusterManagerSpec) DeepCopyInto(out *ClusterManagerSpec)

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

type ClusterManagerStatus

type ClusterManagerStatus struct {
	Provider             string                  `json:"provider,omitempty"`
	Version              string                  `json:"version,omitempty"`
	Ready                bool                    `json:"ready,omitempty"`
	ControlPlaneReady    bool                    `json:"controlPlaneReady,omitempty"`
	AgentReady           bool                    `json:"agentReady,omitempty"`
	MasterRun            int                     `json:"masterRun,omitempty"`
	WorkerRun            int                     `json:"workerRun,omitempty"`
	NodeInfo             []corev1.NodeSystemInfo `json:"nodeInfo,omitempty"`
	Phase                string                  `json:"phase,omitempty"`
	ControlPlaneEndpoint string                  `json:"controlPlaneEndpoint,omitempty"`
	AgentEndpoint        string                  `json:"agentEndpoint,omitempty"`
}

ClusterManagerStatus defines the observed state of ClusterManager

func (*ClusterManagerStatus) DeepCopy

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

func (*ClusterManagerStatus) DeepCopyInto

func (in *ClusterManagerStatus) DeepCopyInto(out *ClusterManagerStatus)

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

func (*ClusterManagerStatus) SetTypedPhase

func (c *ClusterManagerStatus) SetTypedPhase(p ClusterManagerPhase)

type ClusterRegistration

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

	Spec   ClusterRegistrationSpec   `json:"spec,omitempty"`
	Status ClusterRegistrationStatus `json:"status,omitempty"`
}

ClusterRegistration is the Schema for the clusterregistrations API

func (*ClusterRegistration) DeepCopy

func (in *ClusterRegistration) DeepCopy() *ClusterRegistration

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

func (*ClusterRegistration) DeepCopyInto

func (in *ClusterRegistration) DeepCopyInto(out *ClusterRegistration)

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

func (*ClusterRegistration) DeepCopyObject

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

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

func (*ClusterRegistration) SetupWebhookWithManager

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

func (*ClusterRegistration) ValidateCreate

func (r *ClusterRegistration) ValidateCreate() error

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

func (*ClusterRegistration) ValidateDelete

func (r *ClusterRegistration) ValidateDelete() error

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

func (*ClusterRegistration) ValidateUpdate

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

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

type ClusterRegistrationList

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

ClusterRegistrationList contains a list of ClusterRegistration

func (*ClusterRegistrationList) DeepCopy

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

func (*ClusterRegistrationList) DeepCopyInto

func (in *ClusterRegistrationList) DeepCopyInto(out *ClusterRegistrationList)

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

func (*ClusterRegistrationList) DeepCopyObject

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

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

type ClusterRegistrationPhase

type ClusterRegistrationPhase string

type ClusterRegistrationSpec

type ClusterRegistrationSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// The name of the cluster to be created
	ClusterName string `json:"clusterName"`
	// Foo is an example field of ClusterRegistration. Edit ClusterRegistration_types.go to remove/update
	KubeConfig string `json:"kubeConfig,omitempty"`
}

ClusterRegistrationSpec defines the desired state of ClusterRegistration

func (*ClusterRegistrationSpec) DeepCopy

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

func (*ClusterRegistrationSpec) DeepCopyInto

func (in *ClusterRegistrationSpec) DeepCopyInto(out *ClusterRegistrationSpec)

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

type ClusterRegistrationStatus

type ClusterRegistrationStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Provider  string                  `json:"provider,omitempty"`
	Version   string                  `json:"version,omitempty"`
	Ready     bool                    `json:"ready,omitempty"`
	MasterNum int                     `json:"masterNum,omitempty"`
	MasterRun int                     `json:"masterRun,omitempty"`
	WorkerNum int                     `json:"workerNum,omitempty"`
	WorkerRun int                     `json:"workerRun,omitempty"`
	NodeInfo  []corev1.NodeSystemInfo `json:"nodeInfo,omitempty"`
	Phase     string                  `json:"phase,omitempty"`
	Reason    string                  `json:"reason,omitempty"`
}

ClusterRegistrationStatus defines the observed state of ClusterRegistration

func (*ClusterRegistrationStatus) DeepCopy

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

func (*ClusterRegistrationStatus) DeepCopyInto

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

func (*ClusterRegistrationStatus) SetTypedPhase

type ProviderAwsSpec

type ProviderAwsSpec struct {
	// The region where VM is working
	Region string `json:"region,omitempty"`
	// The ssh key info to access VM
	SshKey string `json:"sshKey,omitempty"`
	// The type of VM for master node
	MasterType string `json:"masterType,omitempty"`
	// The type of VM for worker node
	WorkerType string `json:"workerType,omitempty"`
}

ProviderAwsSpec defines

func (*ProviderAwsSpec) DeepCopy

func (in *ProviderAwsSpec) DeepCopy() *ProviderAwsSpec

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

func (*ProviderAwsSpec) DeepCopyInto

func (in *ProviderAwsSpec) DeepCopyInto(out *ProviderAwsSpec)

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

type ProviderVsphereSpec

type ProviderVsphereSpec struct {
	// The internal IP address cider block for pods
	PodCidr string `json:"podCidr,omitempty"`
	// The IP address of vCenter Server Application(VCSA)
	VcenterIp string `json:"vcenterIp,omitempty"`
	// The user id of VCSA
	VcenterId string `json:"vcenterId,omitempty"`
	// The password of VCSA
	VcenterPassword string `json:"vcenterPassword,omitempty"`
	// The TLS thumbprint of machine certificate
	VcenterThumbprint string `json:"vcenterThumbprint,omitempty"`
	// The name of network
	VcenterNetwork string `json:"vcenterNetwork,omitempty"`
	// The name of data center
	VcenterDataCenter string `json:"vcenterDataCenter,omitempty"`
	// The name of data store
	VcenterDataStore string `json:"vcenterDataStore,omitempty"`
	// The name of folder
	VcenterFolder string `json:"vcenterFolder,omitempty"`
	// The name of resource pool
	VcenterResourcePool string `json:"vcenterResourcePool,omitempty"`
	// The IP address of control plane for remote cluster(vip)
	VcenterKcpIp string `json:"vcenterKcpIp,omitempty"`
	// The number of cpus for vm
	VcenterCpuNum int `json:"vcenterCpuNum,omitempty"`
	// The memory size for vm
	VcenterMemSize int `json:"vcenterMemSize,omitempty"`
	// The disk size for vm
	VcenterDiskSize int `json:"vcenterDiskSize,omitempty"`
	// The template name for cloud init
	VcenterTemplate string `json:"vcenterTemplate,omitempty"`
}

ProviderVsphereSpec defines

func (*ProviderVsphereSpec) DeepCopy

func (in *ProviderVsphereSpec) DeepCopy() *ProviderVsphereSpec

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

func (*ProviderVsphereSpec) DeepCopyInto

func (in *ProviderVsphereSpec) DeepCopyInto(out *ProviderVsphereSpec)

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

type ResourceType

type ResourceType struct {
	Type     string `json:"type,omitempty"`
	Capacity string `json:"capacity,omitempty"`
	Usage    string `json:"usage,omitempty"`
}

func (*ResourceType) DeepCopy

func (in *ResourceType) DeepCopy() *ResourceType

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

func (*ResourceType) DeepCopyInto

func (in *ResourceType) DeepCopyInto(out *ResourceType)

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