Replies: 1 comment
-
移除 istio CRD 后,higress 需要对 wasmplugin 定义自己的 API,并实现对应 API 转换逻辑将生成的 wasmplugin 通过 xds 下发给 istio。 apiVersion: extensions.istio.io/v1alpha1
kind: WasmPlugin
metadata:
name: request-block
namespace: higress-system
spec:
selector:
matchLabels:
higress: higress-system-higress-gateway
url: oci://<your_registry_hub>/request-block:1.0.0
pluginConfig:
# 这个配置会全局生效,但如果被下面规则匹配到,则会改为执行命中规则的配置
block_urls:
- "swagger.html"
_rules_:
# 路由级生效配置
- _match_route_:
- default/foo
# default 命名空间下名为 foo 的 ingress 会执行下面这个配置
block_bodys:
- "foo"
- _match_route_:
- default/bar
# default 命名空间下名为 bar 的 ingress 会执行下面这个配置
block_bodys:
- "bar"
# 域名级生效配置
- _match_domain_:
- "*.example.com"
# 若请求匹配了上面的域名, 会执行下面这个配置
block_bodys:
- "foo"
- "bar" higress API 示例: apiVersion: extensions.higress.io/v1alpha1
kind: WasmPlugin
metadata:
name: request-block
namespace: higress-system
spec:
url: oci://<your_registry_hub>/request-block:1.0.0
# 配置生效规则
rules:
# 默认配置,只允许有一个,全局生效
- default: true
config:
block_urls:
- "swagger.html"
# 匹配生效
- match:
# 匹配 ingress 名称,如果在 higress-system 命名空间下,可以省略 namespace/ 前缀
ingress: default/foo
config:
block_bodys:
- "foo"
- match:
ingress: default/bar
config:
block_bodys:
- "bar"
- match:
domain: "*.example.com"
config:
block_bodys:
- "foo"
- "bar" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
周会纪要
社区进展同步
higress.io/destination
注解支持了多个目标服务,可以按按权重路由,配置示例Beta Was this translation helpful? Give feedback.
All reactions