Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the cluster v1alpha1 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io +k8s:deepcopy-gen=package
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type CNIConfig
- type ControlPlaneConfig
- type CustomCluster
- type CustomClusterList
- type CustomClusterPhase
- type CustomClusterSpec
- type CustomClusterStatus
- type CustomMachine
- type CustomMachineList
- type CustomMachineSpec
- type CustomMachineStatus
- type Machine
Constants ¶
const ( // ReadyCondition reports on whether the cluster is provisioned. ReadyCondition capiv1.ConditionType = "Ready" // FailedCreateInitWorker (Severity=Error) documents that the initialization worker failed to create. FailedCreateInitWorker = "InitWorkerFailedCreate" // InitWorkerRunFailedReason (Severity=Error) documents that the initialization worker run failed. InitWorkerRunFailedReason = "InitWorkerRunFailed" // ScaledUpCondition reports on whether the cluster worker nodes is scaled up. ScaledUpCondition capiv1.ConditionType = "ScaledUp" // FailedCreateScaleUpWorker (Severity=Error) documents that the scale up worker failed to create. FailedCreateScaleUpWorker = "ScaleUpWorkerFailedCreate" // ScaleUpWorkerRunFailedReason (Severity=Error) documents that the scale up worker run failed. ScaleUpWorkerRunFailedReason = "ScaleUpWorkerRunFailed" // ScaledDownCondition reports on whether the cluster worker nodes is scaled down. ScaledDownCondition capiv1.ConditionType = "ScaledDown" // FailedCreateScaleDownWorker (Severity=Error) documents that the scale down worker failed to create. FailedCreateScaleDownWorker = "ScaleDownWorkerFailedCreate" // ScaleDownWorkerRunFailedReason (Severity=Error) documents that the scale down worker run failed. ScaleDownWorkerRunFailedReason = "ScaleDownWorkerRunFailed" // UpgradeCondition reports on whether the cluster Kubernetes version is upgraded. UpgradeCondition capiv1.ConditionType = "Upgraded" // UpgradeWorkerCreateFailed (Severity=Error) documents that the upgrade worker failed to create. UpgradeWorkerCreateFailed = "UpgradeWorkerFailedCreate" // UpgradeWorkerRunFailedReason (Severity=Error) documents that the upgrade worker run failed. UpgradeWorkerRunFailedReason = "UpgradeWorkerRunFailed" // TerminatedCondition reports on whether the cluster is terminated. If this condition meet, then the customCluster will be deleted and there won't be any marking as true. TerminatedCondition capiv1.ConditionType = "Terminated" // FailedCreateTerminateWorker (Severity=Error) documents that the terminal worker failed to create. FailedCreateTerminateWorker = "TerminateWorkerFailedCreate" // TerminateWorkerRunFailedReason (Severity=Error) documents that the terminal worker run failed. TerminateWorkerRunFailedReason = "TerminateWorkerRunFailed" // ObtainedKubeConfigCondition reports on whether the kubeConfig of the provisioned cluster has been obtained. Once this condition is met, the kubeConfig secret will be created. ObtainedKubeConfigCondition capiv1.ConditionType = "ObtainedKubeConfig" // FailedFetchKubeConfigReason (Severity=Error) documents failed to fetch provisioned cluster kubeConfig. FailedFetchKubeConfigReason = "FailedFetchKubeConfig" )
const GroupName = "infrastructure.cluster.x-k8s.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type CNIConfig ¶
type CNIConfig struct { // Type is the type of CNI. The supported types are: calico, canal, cilium, flannel, kube-ovn, kube-router, macvlan, weave Type string `json:"type"` }
func (*CNIConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CNIConfig.
func (*CNIConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControlPlaneConfig ¶
type ControlPlaneConfig struct { // same as `ControlPlaneEndpoint` (e.g. 192.x.x.0). Address string `json:"address"` // CertSANs sets extra Subject Alternative Names for the API Server signing cert (e.g.[200.x.x.1,200.x.x.2,kubernetes.default.svc.cluster.local], [200.x.x.1], etc...). // +optional CertSANs []string `json:"certSANs,omitempty"` // LoadBalancerDomainName is a variable used to set the endpoint for a Kubernetes cluster // when a load balancer (LB) is enabled. The default value is ControlPlaneConfig.Address. // +optional LoadBalancerDomainName string `json:"loadBalancerDomainName,omitempty"` }
func (*ControlPlaneConfig) DeepCopy ¶
func (in *ControlPlaneConfig) DeepCopy() *ControlPlaneConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneConfig.
func (*ControlPlaneConfig) DeepCopyInto ¶
func (in *ControlPlaneConfig) DeepCopyInto(out *ControlPlaneConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomCluster ¶
type CustomCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the kurator cluster. Spec CustomClusterSpec `json:"spec,omitempty"` // Current status of the kurator cluster Status CustomClusterStatus `json:"status,omitempty"` }
CustomCluster represents the parameters for a cluster in supplement of Cluster API.
func (*CustomCluster) DeepCopy ¶
func (in *CustomCluster) DeepCopy() *CustomCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomCluster.
func (*CustomCluster) DeepCopyInto ¶
func (in *CustomCluster) DeepCopyInto(out *CustomCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CustomCluster) DeepCopyObject ¶
func (in *CustomCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CustomCluster) GetConditions ¶
func (cc *CustomCluster) GetConditions() capiv1.Conditions
func (*CustomCluster) SetConditions ¶
func (cc *CustomCluster) SetConditions(conditions capiv1.Conditions)
type CustomClusterList ¶
type CustomClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CustomCluster `json:"items"` }
CustomClusterList contains a list of CustomCluster.
func (*CustomClusterList) DeepCopy ¶
func (in *CustomClusterList) DeepCopy() *CustomClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomClusterList.
func (*CustomClusterList) DeepCopyInto ¶
func (in *CustomClusterList) DeepCopyInto(out *CustomClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CustomClusterList) DeepCopyObject ¶
func (in *CustomClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CustomClusterPhase ¶
type CustomClusterPhase string
const ( // PendingPhase represents the customCluster's first phase after being created PendingPhase CustomClusterPhase = "Pending" // ProvisioningPhase represents the cluster is provisioning. In this phase, the worker named ends in "init" is running to initialize the cluster ProvisioningPhase CustomClusterPhase = "Provisioning" // ProvisionedPhase represents the cluster has been created and configured. In this phase, the worker named ends in "init" is completed ProvisionedPhase CustomClusterPhase = "Provisioned" // DeletingPhase represents the delete request has been sent but cluster on has not yet been completely deleted. In this phase, the worker named ends in "terminate" is running to clear the cluster. DeletingPhase CustomClusterPhase = "Deleting" // ProvisionFailedPhase represents something is wrong when creating the cluster. In this phase, the worker named ends in "init" is in error ProvisionFailedPhase CustomClusterPhase = "ProvisionFailed" // UnknownPhase represents provisioned cluster state cannot be determined. It can be scaling failed or deleting failed. UnknownPhase CustomClusterPhase = "Unknown" // ScalingUpPhase represents the cluster is adding the worker nodes. ScalingUpPhase CustomClusterPhase = "ScalingUp" // ScalingDownPhase represents the cluster is removing the worker nodes. ScalingDownPhase CustomClusterPhase = "ScalingDown" // UpgradingPhase represents the kubernetes version of cluster is upgrading. UpgradingPhase CustomClusterPhase = "Upgrading" )
type CustomClusterSpec ¶
type CustomClusterSpec struct { // MachineRef is the reference of nodes for provisioning a kurator cluster. MachineRef *corev1.ObjectReference `json:"machineRef,omitempty"` // CNIConfig is the configuration for the CNI of the cluster. CNI CNIConfig `json:"cni"` // ControlPlaneConfig contains control plane configuration. // +optional ControlPlaneConfig *ControlPlaneConfig `json:"controlPlaneConfig,omitempty"` }
CustomClusterSpec defines the desired state of a kurator cluster.
func (*CustomClusterSpec) DeepCopy ¶
func (in *CustomClusterSpec) DeepCopy() *CustomClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomClusterSpec.
func (*CustomClusterSpec) DeepCopyInto ¶
func (in *CustomClusterSpec) DeepCopyInto(out *CustomClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomClusterStatus ¶
type CustomClusterStatus struct { // Conditions defines current service state of the cluster. // +optional Conditions capiv1.Conditions `json:"conditions,omitempty"` // Phase represents the current phase of customCluster actuation. // E.g. Running, Succeed, Terminating, Failed etc. // +optional Phase CustomClusterPhase `json:"phase,omitempty"` // APIEndpoint is the endpoint to communicate with the apiserver. // Format should be: `https://host:port` // +optional APIEndpoint string `json:"apiEndpoint,omitempty"` // KubeconfigSecretRef represents the secret that contains the credential to access this cluster. // +optional KubeconfigSecretRef string `json:"kubeconfigSecretRef,omitempty"` }
CustomClusterStatus represents the current status of the cluster.
func (*CustomClusterStatus) DeepCopy ¶
func (in *CustomClusterStatus) DeepCopy() *CustomClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomClusterStatus.
func (*CustomClusterStatus) DeepCopyInto ¶
func (in *CustomClusterStatus) DeepCopyInto(out *CustomClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomMachine ¶
type CustomMachine struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the kurator cluster. Spec CustomMachineSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Current status of the machine. Status CustomMachineStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
CustomMachine is the schema for kubernetes nodes.
func (*CustomMachine) DeepCopy ¶
func (in *CustomMachine) DeepCopy() *CustomMachine
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMachine.
func (*CustomMachine) DeepCopyInto ¶
func (in *CustomMachine) DeepCopyInto(out *CustomMachine)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CustomMachine) DeepCopyObject ¶
func (in *CustomMachine) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CustomMachineList ¶
type CustomMachineList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CustomMachine `json:"items"` }
CustomMachineList contains a list of CustomMachine.
func (*CustomMachineList) DeepCopy ¶
func (in *CustomMachineList) DeepCopy() *CustomMachineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMachineList.
func (*CustomMachineList) DeepCopyInto ¶
func (in *CustomMachineList) DeepCopyInto(out *CustomMachineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CustomMachineList) DeepCopyObject ¶
func (in *CustomMachineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CustomMachineSpec ¶
type CustomMachineSpec struct { Master []Machine `json:"master,omitempty"` Nodes []Machine `json:"node,omitempty"` }
CustomMachineSpec defines kubernetes cluster master and nodes.
func (*CustomMachineSpec) DeepCopy ¶
func (in *CustomMachineSpec) DeepCopy() *CustomMachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMachineSpec.
func (*CustomMachineSpec) DeepCopyInto ¶
func (in *CustomMachineSpec) DeepCopyInto(out *CustomMachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomMachineStatus ¶
type CustomMachineStatus struct { // Indicate whether the machines are ready. Ready *bool `json:"ready,omitempty"` }
CustomMachineStatus represents the current status of the machine.
func (*CustomMachineStatus) DeepCopy ¶
func (in *CustomMachineStatus) DeepCopy() *CustomMachineStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMachineStatus.
func (*CustomMachineStatus) DeepCopyInto ¶
func (in *CustomMachineStatus) DeepCopyInto(out *CustomMachineStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Machine ¶
type Machine struct { // HostName is the hostname of the machine. HostName string `json:"hostName"` // PrivateIP is the private ip address of the machine. PrivateIP string `json:"privateIP"` // PublicIP specifies the public IP. PublicIP string `json:"publicIP"` // Region specifies the region where the machine resides. // +optional Region *string `json:"region,omitempty"` // Zone specifies the zone where the machine resides. // +optional Zone *string `json:"zone,omitempty"` // SSHKeyName is the name of the ssh key to attach to the instance. Valid values are empty string (do not use SSH keys), a valid SSH key name, or omitted (use the default SSH key name) // +optional SSHKey *corev1.ObjectReference `json:"sshKey,omitempty"` // AdditionalTags is an optional set of tags to add to an instance. // +optional Labels map[string]string `json:"labels,omitempty"` }
Machine defines a node.
func (*Machine) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine.
func (*Machine) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.