slime-io / slime

An intelligent ServiceMesh manager based on Istio
https://slime-io.github.io/
Other
426 stars 78 forks source link

lazyload support cache wormhole ports #279

Open believening opened 1 year ago

believening commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

After lazyload restarts, it will recalculate the wormhole port, affecting the resources it generates, including envoyfilter, and the configmap used by globalsidecar.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

cywang1905 commented 1 year ago

背景

懒加载组件会根据当前集群中的服务端口范围,计算出兜底路由的作用范围。

问题

这个计算比较耗时,每次懒加载升级,会重新 list 一遍集群全量服务,计算端口范围,再去更新兜底路由。在整个动作完成前,未被兜底路由纳管的端口,如果有请求发出,则只能从业务sidecar容器走 paasthroughCluster 透传出去,失去网格治理能力。

思路

懒加载将计算好的端口范围持久化,下次重启后,直接从持久化处读取到,使得所有兜底路由立刻纳管所有端口,保证网格治理能力生效。这种持久化方式,可以考虑 SlimeBoot CR 的 annotation 等方式

jk-tonycui commented 1 year ago

I would like to contribute, please assign to me.