Skip to content

Commit 7c71348

Browse files
committed
release v2.0.1
Signed-off-by: roc <[email protected]>
1 parent 802db33 commit 7c71348

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

CHANGELOG.md

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

3+
## v2.0.1 (2025-05-21)
4+
5+
- 支持 TCP_SSL 和 QUIC 协议。
6+
- 优化 clb quota 同步机制。
7+
- 一些其他小优化。
8+
39
## v2.0.0 (2025-05-16)
410

511
- 正式发布端口池 API,用法参考: [使用 CLB 端口池为 Pod 映射公网地址](./docs/clb-port-pool.md)

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.0.0
2+
IMG ?= imroc/tke-extend-network-controller:2.0.1
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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ 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.0.0
21+
version: 2.0.1
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.0.0
27+
appVersion: 2.0.1

docs/clb-port-pool.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ spec:
152152
153153
Pod 注解配置方法:
154154
1. 指定注解 `networking.cloud.tencent.com/enable-clb-port-mapping` 为 `true` 开启使用 CLB 端口池为 Pod 映射公网地址。
155-
2. 指定注解 `networking.cloud.tencent.com/clb-port-mapping` 配置映射规则,比如 `8000 UDP pool-test`,其中 `8000` 表示 Pod 监听的端口号,`UDP` 表示端口协议(支持 TCP、UDP 和 TCPUDP,其中 TCPUDP 表示该端口同时监听了 TCP 和 UDP),`pool-test` 表示 CLB 端口池名称,可指定多行来配置多个端口映射。
155+
2. 指定注解 `networking.cloud.tencent.com/clb-port-mapping` 配置映射规则,比如 `8000 UDP pool-test`,其中 `8000` 表示 Pod 监听的端口号,`UDP` 表示端口协议(支持 TCP、UDP、TCP_SSL、QUIC 和 TCPUDP,其中 TCPUDP 表示该端口同时监听了 TCP 和 UDP),`pool-test` 表示 CLB 端口池名称,可指定多行来配置多个端口映射。
156156

157157
`StatefulSet` 配置示例:
158158

@@ -558,9 +558,37 @@ spec:
558558

559559
> 控制器会自动检测内网 CLB 是否绑定了 EIP,如果绑定 EIP 就认为此 CLB 的 VIP 为绑定的 EIP,映射结果也会使用 EIP 地址。
560560

561+
## 使用 TLS
562+
563+
有些场景可能会用到 TLS,比如 websocket H5 小游戏,这时你可以根据需求使用 CLB 的 TCP_SSL 或 QUIC 协议来接入,下面介绍配置方法。
564+
565+
1. 首先,在 [证书管理](https://console.cloud.tencent.com/clb/certificate) 创建好证书并复制证书 ID。
566+
2. 然后,在要为 Pod 映射端口的命名空间中创建一个 Secret,写入 `qcloud_cert_id` 字段,值为证书 ID:
567+
568+
```yaml
569+
apiVersion: v1
570+
kind: Secret
571+
metadata:
572+
name: cert-secret
573+
type: Opaque
574+
stringData:
575+
qcloud_cert_id: "O6TkzGNJ"
576+
```
577+
578+
> 创建 Secret 时,数据 `stringData` 保存时,证书 ID 的值无需 base64 编码,否则需要手动进行 base64 编码再写入。
579+
580+
3. 最后,在声明端口映射的注解中指定使用相应的协议,并指定包含证书 ID 的 Secret 名称:
581+
582+
```yaml
583+
networking.cloud.tencent.com/enable-clb-port-mapping: "true"
584+
networking.cloud.tencent.com/clb-port-mapping: |-
585+
8000 TCP_SSL pool-test certSecret=cert-secret
586+
```
587+
588+
> `certSecret` 选项表示要挂载的证书 Secret 名称,Secret 中必须包含 `qcloud_cert_id` 字段,值为证书 ID。
589+
561590
## TODO
562591

563-
- 支持 tcp_ssl、quic 等协议。
564592
- 端口分配算法:支持先把 clb 分配满,再分配下一个 clb。
565593
- 与 Agones 和 OKG 联动,映射信息写入 GameServer CR。
566594
- 通过 EIP、NATGW 等方式映射。

0 commit comments

Comments
 (0)