Skip to content

Commit 01b27f7

Browse files
committed
feat(chart): use internal vpc api endpoint
Signed-off-by: roc <[email protected]>
1 parent ca35a31 commit 01b27f7

File tree

11 files changed

+8
-22
lines changed

11 files changed

+8
-22
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# 版本说明
22

3+
## v2.3.3 (2025-08-04)
4+
5+
- 优化chart:vpc 接口调用走内部地址,不依赖公网。
6+
37
## v2.3.2 (2025-07-06)
48

59
- 修复端口分配冲突问题。

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Image URL to use all building/pushing image targets
2-
IMG ?= imroc/tke-extend-network-controller:2.3.2
2+
IMG ?= imroc/tke-extend-network-controller:2.3.3
33
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
44
ENVTEST_K8S_VERSION = 1.30.0
55

api/v1alpha1/clbnodebinding_types.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121
)
2222

23-
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
24-
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
25-
2623
// CLBNodeBindingSpec defines the desired state of CLBNodeBinding.
2724
type CLBNodeBindingSpec struct {
2825
// 网络隔离

api/v1alpha1/clbportpool_types.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ import (
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222
)
2323

24-
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
25-
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
26-
2724
// CLBPortPoolSpec defines the desired state of CLBPortPool.
2825
type CLBPortPoolSpec struct {
2926
// 端口池的起始端口号

charts/tke-extend-network-controller/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ type: application
1818
# This is the chart version. This version number should be incremented each time you make changes
1919
# to the chart and its templates, including the app version.
2020
# Versions are expected to follow Semantic Versioning (https://semver.org/)
21-
version: 2.3.2
21+
version: 2.3.3
2222

2323
# This is the version number of the application being deployed. This version number should be
2424
# incremented each time you make changes to the application. Versions are not expected to
2525
# follow Semantic Versioning. They should reflect the version the application is using.
2626
# It is recommended to use it with quotes.
27-
appVersion: 2.3.2
27+
appVersion: 2.3.3
2828
kubeVersion: '>= 1.26.0-0'

charts/tke-extend-network-controller/templates/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
hostAliases:
2121
- hostnames:
2222
- clb.tencentcloudapi.com
23+
- vpc.tencentcloudapi.com
2324
ip: 169.254.0.95
2425
{{- with .Values.imagePullSecrets }}
2526
imagePullSecrets:

internal/controller/clbnodebinding_controller.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ func (r *CLBNodeBindingReconciler) findObjectsForNode(_ context.Context, node cl
106106
return nil
107107
}
108108

109-
// TODO: 优化性能
110109
func (r *CLBNodeBindingReconciler) findObjectsForCLBPortPool(ctx context.Context, portpool client.Object) []reconcile.Request {
111110
list := &networkingv1alpha1.CLBNodeBindingList{}
112111
if err := r.List(ctx, list); err != nil {

internal/controller/clbpodbinding_controller.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ func (r *CLBPodBindingReconciler) findObjectsForPod(ctx context.Context, pod cli
119119
}
120120
}
121121

122-
// TODO: 优化性能
123122
func (r *CLBPodBindingReconciler) findObjectsForCLBPortPool(ctx context.Context, portpool client.Object) []reconcile.Request {
124123
list := &networkingv1alpha1.CLBPodBindingList{}
125124
if err := r.List(ctx, list); err != nil {

internal/webhook/v1alpha1/clbportpool_webhook.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ func SetupCLBPortPoolWebhookWithManager(mgr ctrl.Manager) error {
5050

5151
// CLBPortPoolCustomDefaulter struct is responsible for setting default values on the custom resource of the
5252
// Kind CLBPortPool when those are created or updated.
53-
//
54-
// NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods,
55-
// as it is used only for temporary operations and does not need to be deeply copied.
5653
type CLBPortPoolCustomDefaulter struct{}
5754

5855
var _ webhook.CustomDefaulter = &CLBPortPoolCustomDefaulter{}
@@ -70,16 +67,10 @@ func (d *CLBPortPoolCustomDefaulter) Default(ctx context.Context, obj runtime.Ob
7067
return nil
7168
}
7269

73-
// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
74-
// NOTE: The 'path' attribute must follow a specific pattern and should not be modified directly here.
75-
// Modifying the path for an invalid path can cause API server errors; failing to locate the webhook.
7670
// +kubebuilder:webhook:path=/validate-networking-cloud-tencent-com-v1alpha1-clbportpool,mutating=false,failurePolicy=fail,sideEffects=None,groups=networking.cloud.tencent.com,resources=clbportpools,verbs=create;update,versions=v1alpha1,name=vclbportpool-v1alpha1.kb.io,admissionReviewVersions=v1
7771

7872
// CLBPortPoolCustomValidator struct is responsible for validating the CLBPortPool resource
7973
// when it is created, updated, or deleted.
80-
//
81-
// NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods,
82-
// as this struct is used only for temporary operations and does not need to be deeply copied.
8374
type CLBPortPoolCustomValidator struct {
8475
// TODO(user): Add more fields as needed for validation
8576
}

pkg/clb/batch.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ func StartBatchProccessor[T Task](maxTaskOneBatch int, apiName string, writeOp b
6060
groupTasks[k] = append(groupTasks[k], task)
6161
}
6262
// 将合并后的 task 通过 clb 的 BatchXXX 接口批量操作
63-
// TODO: 能否细化到部分成功的场景?
6463
for lb, tasks := range groupTasks {
6564
for len(tasks) > 0 {
6665
num := min(len(tasks), maxTaskOneBatch)

0 commit comments

Comments
 (0)