Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the cluster v1alpha1 API group +kubebuilder:object:generate=true +groupName=cluster.kurator.dev +k8s:deepcopy-gen=package
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type CIDRBlocks
- type CNIConfig
- type Cluster
- type ClusterInfraType
- type ClusterList
- type ClusterPhase
- type ClusterSpec
- type ClusterStatus
- type CredentialConfig
- type MachineConfig
- type MasterConfig
- type NetworkConfig
- type NodeConfig
- type NodeRegistrationConfig
- type NodeUpgradeStrategy
- type NodeUpgradeStrategyType
- type PodIdentityConfig
- type ResourceRef
- type RollingUpdateNodeUpgradeStrategy
- type VPCConfig
- type Volume
- type WorkerConfig
Constants ¶
const ( // InfrastructureReadyCondition reports a summary status of the infrastructure resources. InfrastructureReadyCondition capiv1.ConditionType = "InfrastructureReady" // InfrastructureProvisionFailedReason (Severity=Error) documents that the infrastructure provisioning failed. InfrastructureProvisionFailedReason = "InfrastructureProvisionFailed" // InfrastructureNotReadyReason (Severity=Error) documents that the infrastructure is not ready. InfrastructureNotReadyReason = "InfrastructureNotReady" // CNICondition reports on whether the CNI is provisioned. CNICondition capiv1.ConditionType = "CNI" // CNIProvisionFailedReason (Severity=Error) documents that the CNI provisioning failed. CNIProvisionFailedReason = "CNIProvisionFailed" // CNIProvisionReadyReason (Severity=Error) documents that the CNI is not ready. CNINotReadyReason = "CNINotReady" // ReadyCondition defines the Ready condition type that summarizes the operational state of a Cluster. ReadyCondition capiv1.ConditionType = "Ready" // ProvisioningReason (Severity=Info) documents that the cluster is being provisioned. ProvisioningReason = "Provisioning" // DeletingReason (Severity=Info) documents that the cluster is being deleted. DeletingReason = "Deleting" // ProviderInitializeFailedReason (Severity=Error) documents that the cluster infrastructure provider initilize failed, probabily a wrong credential. ProviderInitializeFailedReason = "ProviderInitializeFailed" // ClusterResourceSetProvisionFailedReason (Severity=Error) documents that the additinal Cluster API resources (ClusterResourceSet etc.) provisioning failed. ClusterResourceSetProvisionFailedReason = "ClusterResourceSetProvisionFailed" // PrecheckFailedReason (Severity=Error) documents that the cluster precheck is failed. PrecheckFailedReason = "PrecheckFailed" )
const GroupName = "cluster.kurator.dev"
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 CIDRBlocks ¶ added in v0.3.0
type CIDRBlocks []string
func (CIDRBlocks) DeepCopy ¶ added in v0.3.0
func (in CIDRBlocks) DeepCopy() CIDRBlocks
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CIDRBlocks.
func (CIDRBlocks) DeepCopyInto ¶ added in v0.3.0
func (in CIDRBlocks) DeepCopyInto(out *CIDRBlocks)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CNIConfig ¶
type CNIConfig struct { // Type is the type of CNI. Type string `json:"type"` // ExtraArgs is the set of extra arguments for CNI. // +optional ExtraArgs apiextensionsv1.JSON `json:"extraArgs,omitempty"` }
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 Cluster ¶ added in v0.3.0
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` Status ClusterStatus `json:"status,omitempty"` }
Cluster is the schema for the cluster's API +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,categories=kurator-dev +kubebuilder:subresource:status +kubebuilder:printcolumn:name="InfraType",type="string",JSONPath=".spec.infraType",description="Infra type of the cluster" +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="Kubernetes version of the cluster" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Phase of the cluster"
func (*Cluster) DeepCopy ¶ added in v0.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶ added in v0.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶ added in v0.3.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cluster) GetConditions ¶ added in v0.3.0
func (c *Cluster) GetConditions() capiv1beta1.Conditions
func (*Cluster) SetConditions ¶ added in v0.3.0
func (c *Cluster) SetConditions(conditions capiv1beta1.Conditions)
type ClusterInfraType ¶ added in v0.3.0
type ClusterInfraType string
const ( // AWSClusterInfraType is the type for the cluster on AWS infra. AWSClusterInfraType ClusterInfraType = "aws" )
type ClusterList ¶ added in v0.3.0
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Cluster `json:"items"` }
ClusterList contains a list of Cluster. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterList) DeepCopy ¶ added in v0.3.0
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPhase ¶ added in v0.3.0
type ClusterPhase string
ClusterPhase is a string representation of the cluster's phase.
const ( // ClusterPhaseProvisioning is the state when the cluster is being provisioned. ClusterPhaseProvisioning ClusterPhase = "Provisioning" // ClusterPhaseReady is the state when the cluster is ready. // Ready means both cluster and CNI has been provisioned ClusterPhaseReady ClusterPhase = "Ready" // ClusterPhaseDeleting is the state when a delete request has been sent to the API Server. ClusterPhaseDeleting ClusterPhase = "Deleting" // ClusterPhaseFailed is the state when the cluster has failed to be provisioned. ClusterPhaseFailed ClusterPhase = "Failed" )
type ClusterSpec ¶ added in v0.3.0
type ClusterSpec struct { // InfraType is the infra type of the cluster. InfraType ClusterInfraType `json:"infraType"` // Credential is the credential used to access the cloud provider. // +optional Credential *CredentialConfig `json:"credential,omitempty"` // Version is the Kubernetes version to use for the cluster. Version string `json:"version"` // Region is the region to deploy the cluster. Region string `json:"region"` // Network is the network configuration for the cluster. Network NetworkConfig `json:"network"` // Master is the configuration for the master node. Master MasterConfig `json:"master"` // Workers is the list of worker nodes. Workers []WorkerConfig `json:"workers"` // PodIdentity is the configuration for the pod identity. // +optional PodIdentity PodIdentityConfig `json:"podIdentity,omitempty"` // AdditionalResources provides a way to automatically apply a set of resouces to cluster after it's ready. // Note: the resouces will only apply once. // +optional AdditionalResources []ResourceRef `json:"additionalResources,omitempty"` }
ClusterSpec defines the desired state of the Cluster
func (*ClusterSpec) DeepCopy ¶ added in v0.3.0
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶ added in v0.3.0
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 ¶ added in v0.3.0
type ClusterStatus struct { // Conditions defines current service state of the cluster. // +optional Conditions capiv1beta1.Conditions `json:"conditions,omitempty"` // Phase is the current lifecycle phase of the cluster. // +optional Phase string `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"` // ServiceAccountIssuer is the URL of the service account issuer. // +optional ServiceAccountIssuer string `json:"serviceAccountIssuer"` }
ClusterStatus defines the observed state of Cluster
func (*ClusterStatus) DeepCopy ¶ added in v0.3.0
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶ added in v0.3.0
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CredentialConfig ¶ added in v0.3.0
type CredentialConfig struct {
SecretRef string `json:"secretRef"`
}
func (*CredentialConfig) DeepCopy ¶ added in v0.3.0
func (in *CredentialConfig) DeepCopy() *CredentialConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialConfig.
func (*CredentialConfig) DeepCopyInto ¶ added in v0.3.0
func (in *CredentialConfig) DeepCopyInto(out *CredentialConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineConfig ¶ added in v0.3.0
type MachineConfig struct { // Replicas is the number of replicas of the machine. Replicas int `json:"replicas"` // InstanceType is the type of instance to use for the instance. InstanceType string `json:"instanceType"` // SSHKeyName is the name of the SSH key to use for the instance. // +optional SSHKeyName string `json:"sshKeyName,omitempty"` // ImageOS is the OS of the image to use for the instance. // Defaults to "ubuntu-20.04". // +optional // +kubebuilder:default:="ubuntu-20.04" ImageOS string `json:"imageOS,omitempty"` // RootVolume is the root volume to attach to the instance. // +optional RootVolume *Volume `json:"rootVolumeSize,omitempty"` // NonRootVolumes is the list of non-root volumes to attach to the instance. // +optional NonRootVolumes []Volume `json:"nonRootVolumes,omitempty"` // ExtraArgs is the set of extra arguments to create Machine on different infra. // +optional ExtraArgs apiextensionsv1.JSON `json:"extraArgs,omitempty"` }
MachineConfig defines the configuration for the machine.
func (*MachineConfig) DeepCopy ¶ added in v0.3.0
func (in *MachineConfig) DeepCopy() *MachineConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfig.
func (*MachineConfig) DeepCopyInto ¶ added in v0.3.0
func (in *MachineConfig) DeepCopyInto(out *MachineConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MasterConfig ¶ added in v0.3.0
type MasterConfig struct {
NodeConfig `json:",inline"`
}
func (*MasterConfig) DeepCopy ¶ added in v0.3.0
func (in *MasterConfig) DeepCopy() *MasterConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterConfig.
func (*MasterConfig) DeepCopyInto ¶ added in v0.3.0
func (in *MasterConfig) DeepCopyInto(out *MasterConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkConfig ¶ added in v0.3.0
type NetworkConfig struct { // VPC is the configuration for the VPC. VPC VPCConfig `json:"vpc"` // PodCIDRs is the CIDR block for pods in this cluster. // Defaults to 192.168.0.0/16. // +optional // +kubebuilder:default:={"192.168.0.0/16"} PodCIDRs CIDRBlocks `json:"podCIDRs,omitempty"` // ServiceCIDRs is the CIDR block for services in this cluster. // Defaults to 10.96.0.0/12. // +optional // +kubebuilder:default:={"10.96.0.0/12"} ServiceCIDRs CIDRBlocks `json:"serviceCIDRs,omitempty"` // CNI is the configuration for the CNI. CNI CNIConfig `json:"cni"` }
func (*NetworkConfig) DeepCopy ¶ added in v0.3.0
func (in *NetworkConfig) DeepCopy() *NetworkConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkConfig.
func (*NetworkConfig) DeepCopyInto ¶ added in v0.3.0
func (in *NetworkConfig) DeepCopyInto(out *NetworkConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeConfig ¶ added in v0.3.0
type NodeConfig struct { MachineConfig `json:",inline"` NodeRegistrationConfig `json:",inline"` }
NodeConfig defines the configuration for the node.
func (*NodeConfig) DeepCopy ¶ added in v0.3.0
func (in *NodeConfig) DeepCopy() *NodeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfig.
func (*NodeConfig) DeepCopyInto ¶ added in v0.3.0
func (in *NodeConfig) DeepCopyInto(out *NodeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeRegistrationConfig ¶ added in v0.3.0
type NodeRegistrationConfig struct { // Labels is the set of labels to apply to the nodes. Labels map[string]string `json:"labels,omitempty"` // Taints is the set of taints to apply to the nodes. Taints []corev1.Taint `json:"taints,omitempty"` }
NodeRegistrationConfig defines the configuration for the node registration.
func (*NodeRegistrationConfig) DeepCopy ¶ added in v0.3.0
func (in *NodeRegistrationConfig) DeepCopy() *NodeRegistrationConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRegistrationConfig.
func (*NodeRegistrationConfig) DeepCopyInto ¶ added in v0.3.0
func (in *NodeRegistrationConfig) DeepCopyInto(out *NodeRegistrationConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeUpgradeStrategy ¶ added in v0.3.0
type NodeUpgradeStrategy struct { // Type of node replacement strategy. // Default is RollingUpdate. // +optional Type NodeUpgradeStrategyType `json:"type,omitempty"` // RollingUpdate config params. Present only if NodeUpgradeStrategyType = RollingUpdate. // +optional RollingUpdate *RollingUpdateNodeUpgradeStrategy `json:"rollingUpdate,omitempty"` }
func (*NodeUpgradeStrategy) DeepCopy ¶ added in v0.3.0
func (in *NodeUpgradeStrategy) DeepCopy() *NodeUpgradeStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeStrategy.
func (*NodeUpgradeStrategy) DeepCopyInto ¶ added in v0.3.0
func (in *NodeUpgradeStrategy) DeepCopyInto(out *NodeUpgradeStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeUpgradeStrategyType ¶ added in v0.3.0
type NodeUpgradeStrategyType string
const ( // RollingUpdateNodeUpgradeStrategyType replaces old machines by new one using rolling update. RollingUpdateNodeUpgradeStrategyType NodeUpgradeStrategyType = "RollingUpdate" // OnDeleteNodeUpgradeStrategyType replaces old machines when the deletion of the asssoicated machines are completed. OnDeleteNodeUpgradeStrategyType NodeUpgradeStrategyType = "OnDelete" )
type PodIdentityConfig ¶ added in v0.3.0
type PodIdentityConfig struct { // Enabled is true when the pod identity is enabled. Enabled bool `json:"enabled"` }
PodIdentityConfig defines the configuration for the pod identity.
func (*PodIdentityConfig) DeepCopy ¶ added in v0.3.0
func (in *PodIdentityConfig) DeepCopy() *PodIdentityConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIdentityConfig.
func (*PodIdentityConfig) DeepCopyInto ¶ added in v0.3.0
func (in *PodIdentityConfig) DeepCopyInto(out *PodIdentityConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRef ¶ added in v0.3.0
type ResourceRef struct { // Name is the name of the resource. // +kubectl:validation:MinLength=1 Name string `json:"name"` // Kind Of the resource. e.g. ConfigMap, Secret, etc. // +kubebuilder:validation:Enum=ConfigMap;Secret Kind string `json:"kind"` }
func (*ResourceRef) DeepCopy ¶ added in v0.3.0
func (in *ResourceRef) DeepCopy() *ResourceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.
func (*ResourceRef) DeepCopyInto ¶ added in v0.3.0
func (in *ResourceRef) DeepCopyInto(out *ResourceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RollingUpdateNodeUpgradeStrategy ¶ added in v0.3.0
type RollingUpdateNodeUpgradeStrategy struct { intstr.IntOrString `json:"maxUnavailable,omitempty"` // MaxSurge is the maximum number of nodes that can be created above the desired number of nodes during the update. MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` // DeletePolicy defines the policy used to identify nodes to delete when downscaling. // Valid values are "Random", "Newest" and "Oldest". // Defaults to "Newest". // +kubebuilder:validation:Enum=Random;Newest;Oldest // +optional DeletePolicy string `json:"deletePolicy,omitempty"` }MaxUnavailable *
func (*RollingUpdateNodeUpgradeStrategy) DeepCopy ¶ added in v0.3.0
func (in *RollingUpdateNodeUpgradeStrategy) DeepCopy() *RollingUpdateNodeUpgradeStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateNodeUpgradeStrategy.
func (*RollingUpdateNodeUpgradeStrategy) DeepCopyInto ¶ added in v0.3.0
func (in *RollingUpdateNodeUpgradeStrategy) DeepCopyInto(out *RollingUpdateNodeUpgradeStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VPCConfig ¶ added in v0.3.0
type VPCConfig struct { // ID defines a unique identifier to reference this resource. // +optional ID string `json:"id"` // Name is the name of the VPC. // if not set, the name will be generated from cluster name. // +optional Name string `json:"name,omitempty"` // CIDRBlock is the CIDR block to be used when the provider creates a managed VPC. // Defaults to 10.0.0.0/16. // +optional // +kubebuilder:default:="10.0.0.0/16" CIDRBlock string `json:"cidrBlock"` }
func (*VPCConfig) DeepCopy ¶ added in v0.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPCConfig.
func (*VPCConfig) DeepCopyInto ¶ added in v0.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Volume ¶ added in v0.3.0
type Volume struct { // Type is the type of the volume (e.g. gp2, io1, etc...). // +optional Type string `json:"type"` // Size specifies size (in Gi) of the storage device. // Must be greater than the image snapshot size or 8 (whichever is greater). // +kubebuilder:validation:Minimum=8 Size int64 `json:"size"` }
func (*Volume) DeepCopy ¶ added in v0.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.
func (*Volume) DeepCopyInto ¶ added in v0.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkerConfig ¶ added in v0.3.0
type WorkerConfig struct { NodeConfig `json:",inline"` // Strategy to use to replace existing nodes with new ones. // +optional Strategy *NodeUpgradeStrategy `json:"strategy,omitempty"` }
func (*WorkerConfig) DeepCopy ¶ added in v0.3.0
func (in *WorkerConfig) DeepCopy() *WorkerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerConfig.
func (*WorkerConfig) DeepCopyInto ¶ added in v0.3.0
func (in *WorkerConfig) DeepCopyInto(out *WorkerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.