v1beta2

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package v1beta2 contains API Schema definitions for the controlplane v1beta2 API group +kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io

Index

Constants

View Source
const (
	ManagedKubernetesReconcileReadyCondition clusterv1.ConditionType = "ManagedKubernetesReconcileReady"
	ManagedKubernetesReconcileFailedReason   string                  = "ManagedKubernetesReconcileFailed"
	ProviderConfigReconcileReadyCondition    clusterv1.ConditionType = "ProviderConfigReconcileReady"
	ProviderConfigReconcileFailedReason      string                  = "ProviderConfigReconcileFailed"
	VPCReconcileReadyCondition               clusterv1.ConditionType = "VPCReconcileReady"
	VPCReconcileFailedReason                 string                  = "VPCReconcileFailed"
	VSwitchReconcileReadyCondition           clusterv1.ConditionType = "VSwitchReconcileReady"
	VSwitchReconcileFailedReason             string                  = "VSwitchReconcileFailed"
)
View Source
const (
	AliyunManagedControlPlaneReadyCondition    clusterv1.ConditionType = "AliyunManagedControlPlaneReady"
	AliyunManagedControlPlaneCreatingCondition clusterv1.ConditionType = "AliyunManagedControlPlaneCreating"
	AliyunManagedControlPlaneUpdatingCondition clusterv1.ConditionType = "AliyunManagedControlPlaneUpdating"
	AliyunManagedControlPlaneFailedReason      string                  = "AliyunManagedControlPlaneFailed"
)
View Source
const (
	// ManagedControlPlaneFinalizer allows the controller to clean up resources on delete.
	ManagedControlPlaneFinalizer = "aliyunmanagedcontrolplane.controlplane.cluster.x-k8s.io"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1beta2"}

	// 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

func Base36TruncatedHash

func Base36TruncatedHash(str string, length int) (string, error)

Base36TruncatedHash 对目标 str 生成指定长度 length 的摘要字符串.

Base36TruncatedHash returns a consistent hash using blake2b and truncating the byte values to alphanumeric only of a fixed length specified by the consumer.

Types

type AdditionalTags

type AdditionalTags map[string]*string

AdditionalTags defines a map of tags.

func (AdditionalTags) DeepCopy

func (in AdditionalTags) DeepCopy() AdditionalTags

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

func (AdditionalTags) DeepCopyInto

func (in AdditionalTags) DeepCopyInto(out *AdditionalTags)

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

func (AdditionalTags) Validate

func (t AdditionalTags) Validate() []*field.Error

1. key 为1-64个字符; value 为0-128个字符; 2. key 与 value 都不可以以"aliyun"、"acs:"、"https://"或"http://"开头 3. 最多设置20对 key-value; Keys and Values can only have alphabets, numbers, spaces and _ . : / = + - @ as characters. Tag's key cannot have prefix "aws:".

type AliyunManagedControlPlane

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

	Spec   AliyunManagedControlPlaneSpec   `json:"spec,omitempty"`
	Status AliyunManagedControlPlaneStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Cluster",type=string,JSONPath=`.metadata.labels.cluster\.x-k8s\.io/cluster-name` +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.ready`

AliyunManagedControlPlane is the Schema for the aliyunmanagedcontrolplanes API

func (*AliyunManagedControlPlane) DeepCopy

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

func (*AliyunManagedControlPlane) DeepCopyInto

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

func (*AliyunManagedControlPlane) DeepCopyObject

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

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

func (*AliyunManagedControlPlane) Default

func (r *AliyunManagedControlPlane) Default()

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

func (*AliyunManagedControlPlane) GetConditions

func (r *AliyunManagedControlPlane) GetConditions() clusterv1.Conditions

GetConditions returns the observations of the operational state of the AliyunManagedControlPlane resource.

func (*AliyunManagedControlPlane) SetConditions

func (r *AliyunManagedControlPlane) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the underlying service state of the AliyunManagedControlPlane to the predescribed clusterv1.Conditions.

func (*AliyunManagedControlPlane) SetupWebhookWithManager

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

SetupWebhookWithManager will setup the manager to manage the webhooks

func (*AliyunManagedControlPlane) ValidateCreate

func (r *AliyunManagedControlPlane) ValidateCreate() (admission.Warnings, error)

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

func (*AliyunManagedControlPlane) ValidateDelete

func (r *AliyunManagedControlPlane) ValidateDelete() (admission.Warnings, error)

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

func (*AliyunManagedControlPlane) ValidateUpdate

func (r *AliyunManagedControlPlane) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

type AliyunManagedControlPlaneList

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

AliyunManagedControlPlaneList contains a list of AliyunManagedControlPlane

func (*AliyunManagedControlPlaneList) DeepCopy

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

func (*AliyunManagedControlPlaneList) DeepCopyInto

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

func (*AliyunManagedControlPlaneList) DeepCopyObject

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

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

type AliyunManagedControlPlaneSpec

type AliyunManagedControlPlaneSpec struct {
	ClusterName        string                               `json:"clusterName,omitempty"`        // 集群名称
	Region             string                               `json:"region,omitempty"`             // 所属区域(如 cn-hangzhou), 必填, todo: region 是 upjet secret 中声明的
	Version            string                               `json:"version,omitempty"`            // kube版本(如 1.28.3-aliyun.1), 可为空, 空值时使用最新版本
	ClusterSpec        string                               `json:"clusterSpec,omitempty"`        // 集群节点规格(如 ack.pro.small)
	ClusterDomain      string                               `json:"clusterDomain,omitempty"`      // upjet 字段赋值时可为空, 空值时默认使用 cluster.local
	ResourceGroup      string                               `json:"resourceGroup,omitempty"`      //
	DeletionProtection bool                                 `json:"deletionProtection,omitempty"` //
	TimeZone           string                               `json:"timeZone,omitempty"`           // 时区(如 Asia/Shanghai)
	AdditionalTags     AdditionalTags                       `json:"additionalTags,omitempty"`
	Network            AliyunManagedControlPlaneSpecNetwork `json:"network,omitempty"`

	Addons  []csv1alpha1.AddonsParameters        `json:"addons,omitempty"`  //
	Logging AliyunManagedControlPlaneSpecLogging `json:"logging,omitempty"` //
	// todo: terway 需要设置 pod_vswitch_ids + addon(eniip), flannel 需要设置 pod_cidr + addon(flannel)
	CNI              AliyunManagedControlPlaneSpecCNI              `json:"cni,omitempty"`
	EntryptionConfig AliyunManagedControlPlaneSpecEncryptionConfig `json:"entryptionConfig,omitempty"` //
	KubeProxy        AliyunManagedControlPlaneSpecKubeProxy        `json:"kubeProxy,omitempty"`        //
	EndpointAccess   AliyunManagedControlPlaneSpecEndpointAccess   `json:"endpointAccess,omitempty"`   // todo: 是否为 apiserver 配置公网IP

	ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint,omitempty"`
}

AliyunManagedControlPlaneSpec defines the desired state of AliyunManagedControlPlane

func (*AliyunManagedControlPlaneSpec) DeepCopy

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

func (*AliyunManagedControlPlaneSpec) DeepCopyInto

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

type AliyunManagedControlPlaneSpecCNI

type AliyunManagedControlPlaneSpecCNI struct {
	Disable bool `json:"disable,omitempty"`
}

func (*AliyunManagedControlPlaneSpecCNI) DeepCopy

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

func (*AliyunManagedControlPlaneSpecCNI) DeepCopyInto

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

type AliyunManagedControlPlaneSpecEncryptionConfig

type AliyunManagedControlPlaneSpecEncryptionConfig struct {
	ProviderKey string `json:"providerKey,omitempty"`
}

func (*AliyunManagedControlPlaneSpecEncryptionConfig) DeepCopy

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

func (*AliyunManagedControlPlaneSpecEncryptionConfig) DeepCopyInto

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

type AliyunManagedControlPlaneSpecEndpointAccess

type AliyunManagedControlPlaneSpecEndpointAccess struct {
	Public bool `json:"public,omitempty"`
}

func (*AliyunManagedControlPlaneSpecEndpointAccess) DeepCopy

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

func (*AliyunManagedControlPlaneSpecEndpointAccess) DeepCopyInto

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

type AliyunManagedControlPlaneSpecKubeProxy

type AliyunManagedControlPlaneSpecKubeProxy struct {
	ProxyMode string `json:"proxyMode,omitempty"` // (如 ipvs, iptables)
}

func (*AliyunManagedControlPlaneSpecKubeProxy) DeepCopy

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

func (*AliyunManagedControlPlaneSpecKubeProxy) DeepCopyInto

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

type AliyunManagedControlPlaneSpecLogging

type AliyunManagedControlPlaneSpecLogging struct {
	Enable     bool      `json:"enable,omitempty"`
	TTL        string    `json:"ttl,omitempty"`
	Components []*string `json:"components,omitempty"` // (如 [apiserver, kcm, ])
}

func (*AliyunManagedControlPlaneSpecLogging) DeepCopy

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

func (*AliyunManagedControlPlaneSpecLogging) DeepCopyInto

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

type AliyunManagedControlPlaneSpecNetwork

type AliyunManagedControlPlaneSpecNetwork struct {
	Vpc           commonapi.VPC                              `json:"vpc,omitempty"`
	VSwitches     commonapi.VSwitches                        `json:"vSwitches,omitempty"`
	PodCIDR       string                                     `json:"podCIDR,omitempty"`       // todo: 新增
	ServiceCIDR   string                                     `json:"serviceCIDR,omitempty"`   // 必填, 点分十进制IP, 带掩码(如 172.16.0.0/16)
	NatGateway    bool                                       `json:"natGateway,omitempty"`    //
	SecurityGroup AliyunManagedControlPlaneSpecSecurityGroup `json:"securityGroup,omitempty"` //
}

func (*AliyunManagedControlPlaneSpecNetwork) DeepCopy

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

func (*AliyunManagedControlPlaneSpecNetwork) DeepCopyInto

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

type AliyunManagedControlPlaneSpecSecurityGroup

type AliyunManagedControlPlaneSpecSecurityGroup struct {
	ID         string `json:"id,omitempty"`
	Create     bool   `json:"create,omitempty"`
	Enterprice bool   `json:"enterprice,omitempty"`
}

func (*AliyunManagedControlPlaneSpecSecurityGroup) DeepCopy

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

func (*AliyunManagedControlPlaneSpecSecurityGroup) DeepCopyInto

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

type AliyunManagedControlPlaneStatus

type AliyunManagedControlPlaneStatus struct {
	Ready          bool                     `json:"ready,omitempty"`       // 平台创建 control plane 成功(就绪)后, 即可设置为 true
	Initialized    bool                     `json:"initialized,omitempty"` // 集群创建完成且 kube config 配置创建完成后, 即可设置为 true
	FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`
	FailureReason  string                   `json:"failureReason,omitempty"` // todo(reason 与 message 是否重复了)
	FailureMessage string                   `json:"failureMessage,omitempty"`

	ExternalManagedControlPlane bool                                   `json:"externalManagedControlPlane,omitempty"`
	Version                     string                                 `json:"version,omitempty"` // 貌似与 .spec.version 保持一致
	Conditions                  clusterv1.Conditions                   `json:"conditions,omitempty"`
	NetworkStatus               AliyunManagedControlPlaneStatusNetwork `json:"networkStatus,omitempty"`
	Addons                      []csv1alpha1.AddonsObservation         `json:"addons,omitempty"`
	ClusterID                   string                                 `json:"clusterId,omitempty"` // todo: 新增
}

AliyunManagedControlPlaneStatus defines the observed state of AliyunManagedControlPlane

func (*AliyunManagedControlPlaneStatus) DeepCopy

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

func (*AliyunManagedControlPlaneStatus) DeepCopyInto

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

type AliyunManagedControlPlaneStatusNetwork

type AliyunManagedControlPlaneStatusNetwork struct {
	SecurityGroup  string `json:"securityGroup,omitempty"`
	ApiServerSlbID string `json:"apiServerSlbId,omitempty"`
	NatGatewayID   string `json:"natGatewayId,omitempty"`
}

func (*AliyunManagedControlPlaneStatusNetwork) DeepCopy

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

func (*AliyunManagedControlPlaneStatusNetwork) DeepCopyInto

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