slime-io / slime

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

plugin: support raw patch #401

Closed YonkaFang closed 1 year ago

YonkaFang commented 1 year ago

本PR为plugin模块(envoyplugin、pluginmanager)增加”额外的patch“能力,也即将指定内容patch到生成的envoyfilter configpatch

样例:

# envoyplugin
  plugins:
  - enable: true
    inline:
      settings: {}
        # ...
    rawPatch:  # 这个
      match:
        proxy:
          proxyVersion: "abc"

对应的envoyfilter则多出了如下内容

# envoyfilter
  configPatches:
  - applyTo: VIRTUAL_HOST
    match:
      context: SIDECAR_OUTBOUND
      proxy:
        proxyVersion: "abc"  # 这个
      routeConfiguration:
        vhost:
          name: xxx
    patch:
      operation: MERGE