Documentation
¶
Index ¶
- Constants
- Variables
- func Init(log logr.Logger, mgr ctrl.Manager)
- type AllocatableCLBInfo
- type AllocatedCLBInfo
- type DedicatedCLBListener
- func (in *DedicatedCLBListener) DeepCopy() *DedicatedCLBListener
- func (in *DedicatedCLBListener) DeepCopyInto(out *DedicatedCLBListener)
- func (in *DedicatedCLBListener) DeepCopyObject() runtime.Object
- func (r *DedicatedCLBListener) Default()
- func (r *DedicatedCLBListener) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *DedicatedCLBListener) ValidateCreate() (admission.Warnings, error)
- func (r *DedicatedCLBListener) ValidateDelete() (admission.Warnings, error)
- func (r *DedicatedCLBListener) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type DedicatedCLBListenerList
- type DedicatedCLBListenerSpec
- type DedicatedCLBListenerStatus
- type DedicatedCLBService
- type DedicatedCLBServiceList
- type DedicatedCLBServicePort
- type DedicatedCLBServiceSpec
- type DedicatedCLBServiceStatus
- type LbAutoCreate
- type TargetPod
Constants ¶
const ( DedicatedCLBListenerStateBound = "Bound" DedicatedCLBListenerStateAvailable = "Available" DedicatedCLBListenerStatePending = "Pending" DedicatedCLBListenerStateFailed = "Failed" DedicatedCLBListenerStateDeleting = "Deleting" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "networking.cloud.tencent.com", 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 ¶
Types ¶
type AllocatableCLBInfo ¶ added in v1.0.0
type AllocatableCLBInfo struct {
// CLB 实例的 ID。
LbId string `json:"lbId"`
// CLB 当前已被分配的端口。
// +optional
CurrentPort int64 `json:"currentPort"`
// 是否是自动创建的 CLB。如果是,删除 DedicatedCLBService 时,CLB 也会被清理。
AutoCreate bool `json:"autoCreate"`
}
func (*AllocatableCLBInfo) DeepCopy ¶ added in v1.0.0
func (in *AllocatableCLBInfo) DeepCopy() *AllocatableCLBInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatableCLBInfo.
func (*AllocatableCLBInfo) DeepCopyInto ¶ added in v1.0.0
func (in *AllocatableCLBInfo) DeepCopyInto(out *AllocatableCLBInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AllocatedCLBInfo ¶ added in v1.0.0
type AllocatedCLBInfo struct {
// CLB 实例的 ID。
LbId string `json:"lbId"`
// 是否是自动创建的 CLB。如果是,删除 DedicatedCLBService 时,CLB 也会被清理。
AutoCreate bool `json:"autoCreate"`
}
func (*AllocatedCLBInfo) DeepCopy ¶ added in v1.0.0
func (in *AllocatedCLBInfo) DeepCopy() *AllocatedCLBInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedCLBInfo.
func (*AllocatedCLBInfo) DeepCopyInto ¶ added in v1.0.0
func (in *AllocatedCLBInfo) DeepCopyInto(out *AllocatedCLBInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DedicatedCLBListener ¶
type DedicatedCLBListener struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DedicatedCLBListenerSpec `json:"spec,omitempty"`
Status DedicatedCLBListenerStatus `json:"status,omitempty"`
}
DedicatedCLBListener is the Schema for the dedicatedclblisteners API
func (*DedicatedCLBListener) DeepCopy ¶
func (in *DedicatedCLBListener) DeepCopy() *DedicatedCLBListener
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBListener.
func (*DedicatedCLBListener) DeepCopyInto ¶
func (in *DedicatedCLBListener) DeepCopyInto(out *DedicatedCLBListener)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DedicatedCLBListener) DeepCopyObject ¶
func (in *DedicatedCLBListener) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DedicatedCLBListener) Default ¶
func (r *DedicatedCLBListener) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*DedicatedCLBListener) SetupWebhookWithManager ¶
func (r *DedicatedCLBListener) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager will setup the manager to manage the webhooks
func (*DedicatedCLBListener) ValidateCreate ¶
func (r *DedicatedCLBListener) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*DedicatedCLBListener) ValidateDelete ¶
func (r *DedicatedCLBListener) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*DedicatedCLBListener) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type DedicatedCLBListenerList ¶
type DedicatedCLBListenerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DedicatedCLBListener `json:"items"`
}
DedicatedCLBListenerList contains a list of DedicatedCLBListener
func (*DedicatedCLBListenerList) DeepCopy ¶
func (in *DedicatedCLBListenerList) DeepCopy() *DedicatedCLBListenerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBListenerList.
func (*DedicatedCLBListenerList) DeepCopyInto ¶
func (in *DedicatedCLBListenerList) DeepCopyInto(out *DedicatedCLBListenerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DedicatedCLBListenerList) DeepCopyObject ¶
func (in *DedicatedCLBListenerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DedicatedCLBListenerSpec ¶
type DedicatedCLBListenerSpec struct {
// CLB 实例的 ID。
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="Value is immutable"
LbId string `json:"lbId"`
// CLB 所在地域,不填则使用 TKE 集群所在的地域。
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="Value is immutable"
// +optional
LbRegion string `json:"lbRegion,omitempty"`
// CLB 监听器的端口号。
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="Value is immutable"
LbPort int64 `json:"lbPort"`
// CLB 监听器的协议。
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="Value is immutable"
// +kubebuilder:validation:Enum=TCP;UDP
Protocol string `json:"protocol"`
// 创建监听器的参数,JSON 格式,详细参数请参考 CreateListener 接口:https://cloud.tencent.com/document/api/214/30693
// +optional
ExtensiveParameters string `json:"extensiveParameters,omitempty"`
// CLB 监听器绑定的目标 Pod。
// +optional
TargetPod *TargetPod `json:"targetPod,omitempty"`
}
DedicatedCLBListenerSpec defines the desired state of DedicatedCLBListener
func (*DedicatedCLBListenerSpec) DeepCopy ¶
func (in *DedicatedCLBListenerSpec) DeepCopy() *DedicatedCLBListenerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBListenerSpec.
func (*DedicatedCLBListenerSpec) DeepCopyInto ¶
func (in *DedicatedCLBListenerSpec) DeepCopyInto(out *DedicatedCLBListenerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DedicatedCLBListenerStatus ¶
type DedicatedCLBListenerStatus struct {
// CLB 监听器的 ID。
ListenerId string `json:"listenerId,omitempty"`
// CLB 监听器的状态。
// +kubebuilder:validation:Enum=Bound;Available;Pending;Failed;Deleting
State string `json:"state,omitempty"`
// 记录 CLB 监听器的失败信息。
Message string `json:"message,omitempty"`
// CLB 监听器的外部地址。
Address string `json:"address,omitempty"`
}
DedicatedCLBListenerStatus defines the observed state of DedicatedCLBListener
func (*DedicatedCLBListenerStatus) DeepCopy ¶
func (in *DedicatedCLBListenerStatus) DeepCopy() *DedicatedCLBListenerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBListenerStatus.
func (*DedicatedCLBListenerStatus) DeepCopyInto ¶
func (in *DedicatedCLBListenerStatus) DeepCopyInto(out *DedicatedCLBListenerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DedicatedCLBService ¶
type DedicatedCLBService struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DedicatedCLBServiceSpec `json:"spec,omitempty"`
Status DedicatedCLBServiceStatus `json:"status,omitempty"`
}
DedicatedCLBService is the Schema for the dedicatedclbservices API
func (*DedicatedCLBService) DeepCopy ¶
func (in *DedicatedCLBService) DeepCopy() *DedicatedCLBService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBService.
func (*DedicatedCLBService) DeepCopyInto ¶
func (in *DedicatedCLBService) DeepCopyInto(out *DedicatedCLBService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DedicatedCLBService) DeepCopyObject ¶
func (in *DedicatedCLBService) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DedicatedCLBServiceList ¶
type DedicatedCLBServiceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DedicatedCLBService `json:"items"`
}
DedicatedCLBServiceList contains a list of DedicatedCLBService
func (*DedicatedCLBServiceList) DeepCopy ¶
func (in *DedicatedCLBServiceList) DeepCopy() *DedicatedCLBServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBServiceList.
func (*DedicatedCLBServiceList) DeepCopyInto ¶
func (in *DedicatedCLBServiceList) DeepCopyInto(out *DedicatedCLBServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DedicatedCLBServiceList) DeepCopyObject ¶
func (in *DedicatedCLBServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DedicatedCLBServicePort ¶
type DedicatedCLBServicePort struct {
// 端口协议,支持 TCP、UDP。
Protocol string `json:"protocol"`
// 目标端口。
TargetPort int64 `json:"targetPort"`
// Pod 外部地址的注解,如果设置,Pod 被映射的外部 CLB 地址将会被自动写到 Pod 的该注解中,Pod 内部可通过 Downward API 感知到自身的外部地址。
// +optional
AddressPodAnnotation string `json:"addressPodAnnotation"`
}
func (*DedicatedCLBServicePort) DeepCopy ¶
func (in *DedicatedCLBServicePort) DeepCopy() *DedicatedCLBServicePort
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBServicePort.
func (*DedicatedCLBServicePort) DeepCopyInto ¶
func (in *DedicatedCLBServicePort) DeepCopyInto(out *DedicatedCLBServicePort)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DedicatedCLBServiceSpec ¶
type DedicatedCLBServiceSpec struct {
// CLB 所在地域,不填则使用 TKE 集群所在的地域。
// +optional
LbRegion string `json:"lbRegion,omitempty"`
// CLB 所在 VPC ID,不填则使用 TKE 集群所在的 VPC 的 ID。
// +optional
VpcId *string `json:"vpcId"`
// CLB 端口范围的最小端口号。
// +optional
// +kubebuilder:default:value=500
MinPort int64 `json:"minPort,omitempty"`
// CLB 端口范围的最大端口号。
// +optional
// +kubebuilder:default:value=50000
MaxPort int64 `json:"maxPort,omitempty"`
// 限制单个 CLB 的 Pod/监听器 的最大数量。
// +optional
MaxPod *int64 `json:"maxPod,omitempty"`
// Pod 的标签选择器,被选中的 Pod 会被绑定到 CLB 监听器下。
Selector map[string]string `json:"selector"`
// Pod 监听的端口。
Ports []DedicatedCLBServicePort `json:"ports"`
// 创建监听器的参数,JSON 格式,详细参数请参考 CreateListener 接口:https://cloud.tencent.com/document/api/214/30693
// +optional
ListenerExtensiveParameters string `json:"listenerExtensiveParameters,omitempty"`
// 复用的已有的 CLB ID,可动态追加。
// +optional
ExistedLbIds []string `json:"existedLbIds,omitempty"`
// 启用自动创建 CLB 的功能。
// +optional
LbAutoCreate LbAutoCreate `json:"lbAutoCreate,omitempty"`
}
DedicatedCLBServiceSpec defines the desired state of DedicatedCLBService
func (*DedicatedCLBServiceSpec) DeepCopy ¶
func (in *DedicatedCLBServiceSpec) DeepCopy() *DedicatedCLBServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBServiceSpec.
func (*DedicatedCLBServiceSpec) DeepCopyInto ¶
func (in *DedicatedCLBServiceSpec) DeepCopyInto(out *DedicatedCLBServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DedicatedCLBServiceStatus ¶
type DedicatedCLBServiceStatus struct {
// 可分配端口的 CLB 列表
// +optional
AllocatableLb []AllocatableCLBInfo `json:"allocatableLb"`
// 已分配完端口的 CLB 列表
// +optional
AllocatedLb []AllocatedCLBInfo `json:"allocatedLb"`
}
DedicatedCLBServiceStatus defines the observed state of DedicatedCLBService
func (*DedicatedCLBServiceStatus) DeepCopy ¶
func (in *DedicatedCLBServiceStatus) DeepCopy() *DedicatedCLBServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedCLBServiceStatus.
func (*DedicatedCLBServiceStatus) DeepCopyInto ¶
func (in *DedicatedCLBServiceStatus) DeepCopyInto(out *DedicatedCLBServiceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LbAutoCreate ¶
type LbAutoCreate struct {
// 是否启用自动创建 CLB 的功能,如果启用,当 CLB 不足时,会自动创建新的 CLB。
// +optional
Enable bool `json:"enable,omitempty"`
// 创建 CLB 时的参数,JSON 格式,详细参数请参考 CreateLoadBalancer 接口:https://cloud.tencent.com/document/api/214/30692
// +optional
ExtensiveParameters string `json:"extensiveParameters,omitempty"`
}
func (*LbAutoCreate) DeepCopy ¶
func (in *LbAutoCreate) DeepCopy() *LbAutoCreate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LbAutoCreate.
func (*LbAutoCreate) DeepCopyInto ¶
func (in *LbAutoCreate) DeepCopyInto(out *LbAutoCreate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetPod ¶ added in v0.1.8
type TargetPod struct {
// Pod 的名称。
PodName string `json:"podName"`
// Pod 监听的端口。
TargetPort int64 `json:"targetPort"`
}
func (*TargetPod) DeepCopy ¶ added in v0.1.8
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetPod.
func (*TargetPod) DeepCopyInto ¶ added in v0.1.8
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.