slime-io / slime

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

lazyload: fix dispatch before route to global-sidecar #379

Closed MouceL closed 1 year ago

MouceL commented 1 year ago

我们之前支持了 dispatch 特性,即我们可以指定指定某些域名的路由到指定cluster

  module:
    - name: lazyload
      kind: lazyload
      enable: true
      general:
        dispatches:
        - name: fake
          domains:
          - "www.163.com"
          - "*.slime.io"  
          cluster: "PassthroughCluster"
        disableIpv4Passthrough: false
        autoPort: true
        autoFence: true
        defaultFence: true   
        wormholePort:
          - "9080"

上面slimeboot中描述,我们将www.163.com以及*.slimeio的流量直接透传

(修改slimeboot后需要重启slime才能生效)

但是后来支持的ipv4透传功能与dispatch功能有冲突。


本次提交使得以下逻辑正常运行:

符合dispatch的流量走passthrough

符合ipv4流量走passthrough

其余匹配不上的流量走兜底


需要补充说明的 dispatch 的domains 只支持

精确: www.foo.com 前缀: foo.* 后缀:*.foo.com

YonkaFang commented 1 year ago

你把介绍特性的内容 和 本pr的内容分开描述一下吧。


来分隔