File tree 6 files changed +31
-14
lines changed
6 files changed +31
-14
lines changed Original file line number Diff line number Diff line change 2
2
3
3
针对 TKE 集群一些特殊场景的的网络控制器。
4
4
5
- [ API 参考] ( docs/api.md )
6
-
7
5
## 支持房间类场景
8
6
9
7
目前主要支持会议、游戏战斗服等房间类场景的网络,即要求每个 Pod 都需要独立的公网地址,TKE 集群默认只支持 EIP 方案,但 EIP 资源有限,不仅是数量的限制,还有每日申请的数量限制,稍微上点规模,或频繁扩缩容更换EIP,可能很容易触达限制导致 EIP 分配失败;而如果保留 EIP,在 EIP 没被绑定前,又会收取额外的闲置费。
@@ -132,9 +130,13 @@ status:
132
130
133
131
然后 controller 根据 ` DedicatedCLBListener` 进行对账,自动将 Pod 绑定到对应的 CLB 监听器上。
134
132
135
- # # 使用 NAT 网关为 Pod 分配公网地址映射
133
+ # # 更多
136
134
137
- TODO
135
+ * [CRD 字段说明](docs/crd.md)
136
+ * [API 参考](docs/api.md)
137
+ * [Roadmap](docs/roadmap.md)
138
+ * [贡献指南](docs/contributing.md)
139
+ * [技术亮点](docs/inside.md)
138
140
139
141
# # 项目状态与版本说明
140
142
Original file line number Diff line number Diff line change
1
+ # 贡献指南
2
+
3
+ 欢迎参与本项目的开发,贡献代码或文档。
4
+
5
+ ## 使用 kubebuilder 生成
6
+
7
+ 本项目的控制器代码使用 ` kubebuilder ` 生成,基于 [ controller-runtime] ( https://github.com/kubernetes-sigs/controller-runtime ) 框架,具体请参考 [ kubebuilder 官方文档] ( https://book.kubebuilder.io/quick-start.html ) 。
8
+
9
+ ## 沟通
10
+
11
+ 有任何疑问或需求,欢迎通过 [ issue] ( https://github.com/imroc/tke-extend-network-controller/issues/new ) 联系我们。
Original file line number Diff line number Diff line change 1
- # API 设计
1
+ # API 设计与字段说明
2
2
3
3
## DedicatedCLBService
4
4
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # 技术亮点
2
+
3
+ ## Pod 缓存
4
+
5
+ 控制器除了 list watch 自身 CRD 相关资源外,还 list watch 了 Pod 资源,而大规模场景下,全量 Pod 缓存占用内存较大,因为在 Pod 入缓存前,只保留本控制器关注的字段,其他字段不缓存,这样可大大降低内存占用。当要更新 Pod 时(比如注解和finalizer),就不直接拿缓存里的 Pod 进行 Update(因为缓存字段不全,无法直接 Update),而是先从 API Server 获取 Pod,再更新。
6
+
7
+ ## 并发与实例锁
8
+
9
+ 很多CLB的写接口都有实例锁,且是异步的,并发调用或间隔太短都容易导致实例锁冲突,最终导致接口调用失败。在实现时,我们将异步的接口调用包装成同步的函数(内部通过轮询查询异步任务的状态直到任务结束来实现将异步转为同步),再通过加锁的方式,保证每个CLB实例的写操作的原子性,即避免并发冲突,又做到了尽可能快的对账操作(避免CLB的写操作延迟导致流量异常)。
Original file line number Diff line number Diff line change
1
+ # Roadmap
2
+
3
+ * [ ] ` DedicatedCLBService ` 支持自动创建CLB。
4
+ * [ ] 支持使用 NAT 网关映射 IP: Port 。
You can’t perform that action at this time.
0 commit comments