We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sidecar的启动和业务容器的启动顺序存在依赖关系,kubelet拉起pod内的多容器并不能保证envoy就绪后再启动主容器,这会导致主容器在启动时因为envoy未就绪而失败,虽然我们可以通过提高代码的健壮性例如循环调用等方法来解决这个问题,但也应该有比较通用型的解决方法
调整顺序,envoy和polaris-sidecar的顺序在主容器之前并且在确保envoy ready后再启动业务容器,envoy v1.26.2的官方文档有:15000/ready可以用来当作envoy的readiness探针,参考istio的旧版解决方法,在sidecar注入时在poststart中假如等待envoyreadiness探针返回200再启动业务容器 add.Lifecycle = &corev1.Lifecycle{ PostStart: &corev1.LifecycleHandler{ Exec: &corev1.ExecAction{ Command: []string{"/bin/bash", "-c", "while (($(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:15000/ready) !="200")); do echo Waiting for Sidecar;sleep 1; done;"}, }, }, }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
sidecar的启动和业务容器的启动顺序存在依赖关系,kubelet拉起pod内的多容器并不能保证envoy就绪后再启动主容器,这会导致主容器在启动时因为envoy未就绪而失败,虽然我们可以通过提高代码的健壮性例如循环调用等方法来解决这个问题,但也应该有比较通用型的解决方法
调整顺序,envoy和polaris-sidecar的顺序在主容器之前并且在确保envoy ready后再启动业务容器,envoy v1.26.2的官方文档有:15000/ready可以用来当作envoy的readiness探针,参考istio的旧版解决方法,在sidecar注入时在poststart中假如等待envoyreadiness探针返回200再启动业务容器
add.Lifecycle = &corev1.Lifecycle{
PostStart: &corev1.LifecycleHandler{
Exec: &corev1.ExecAction{
Command: []string{"/bin/bash", "-c", "while (($(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:15000/ready) !="200")); do echo Waiting for Sidecar;sleep 1; done;"},
},
},
}
The text was updated successfully, but these errors were encountered: