slime-io / slime

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

当服务启动时调用外部服务无法懒加载资源 #420

Closed Patrick0308 closed 1 year ago

Patrick0308 commented 1 year ago

问题描述 当服务启动时调用外部服务无法懒加载资源。 具体原因: lazyload 根据上报的 Source Ip 找不到 K8s Service,因为 pod 还在启动中,在 Endpoints 资源中 pod address 状态是 notReady,见代码 https://github.com/slime-io/slime/blob/c7ba4bdcc48a85a310961a3c55633224d241ce6f/staging/src/slime.io/slime/modules/lazyload/controllers/service_cache.go#L354

影响的子模块(在下面列表中打'X')

重现问题的步骤

MouceL commented 1 year ago

确实存在这个问题

但请求总归能够发送出去

Patrick0308 commented 1 year ago

@MouceL 可以把 subset 中的 NotReadyAddresses 建立索引