|      1vemier      2020-12-31 17:27:56 +08:00 istio 很好实现,service 加版本号就行 | 
|  |      2idblife OP | 
|      3vemier      2020-12-31 17:48:59 +08:00 via iPhone @idblife 有的,你看下 bookinfo 那个 demo,v1 版本的 service 只能调用 v1 版本的其它 service | 
|      6eric96      2020-12-31 18:21:50 +08:00 没用过 istio,想问下如果我服务间调用是走的 tcp,还能用 istio 吗 | 
|  |      7yzbythesea      2020-12-31 18:25:16 +08:00 客户端请求加一个 header 标明版本,然后配置下 Load Balancer,按这个 header 分流。 | 
|  |      8idblife OP @yzbythesea  举个例子 foo 这个服务接收到了客户端请求, 根据客户端 header 里的标明版本访问了 v1 的 foo, v1 的 foo 去访问 bar 这个服务的时候如何控制访问 v1 的 bar 呢? | 
|  |      10idblife OP @yzbythesea  istio 文档里有这个功能,coding 下肯定能实现了,就是还没找到#3 大哥提到的原生解决方案 Headers.HeaderOperations Overwrite the headers specified by key with the given values Append the given values to the headers specified by keys (will create a comma-separated list of values) Remove a the specified headers | 
|      11vemier      2020-12-31 19:10:43 +08:00  1 @idblife  具体可以参考 bookinfo/networking 下的配置文件,这是其中一个例子 https://istio.io/latest/docs/tasks/traffic-management/request-routing/#route-based-on-user-identity 然后用 k8s 的方式直接调用 https://stackoverflow.com/questions/53095459/invoke-a-service-from-a-multi-container-pod-with-a-istio-sidecar 新项目用起来很方便,如果是老项目还是在已有框架的基础上修改吧。 | 
|  |      12pythonee      2021-01-04 20:57:14 +08:00 这个是不是可以考虑在业务代码实现 | 
|  |      149      2021-01-25 14:15:03 +08:00  1 @idblife  "v1 的 foo 去访问 bar 这个服务的时候如何控制访问 v1 的 bar 呢?" 用 sourceLabels 保证 bar:v1 接受来自 foo:v1 的流量 sourceLabels: version: v1 |