higress icon indicating copy to clipboard operation
higress copied to clipboard

请求转换插件不生效

Open jingzhe6414 opened this issue 5 days ago • 2 comments

配置文件:

全局版本: apiVersion: extensions.higress.io/v1alpha1 kind: WasmPlugin metadata: annotations: higress.io/wasm-plugin-description: Convert request/response headers, request query parameters, and request/response body parameters. higress.io/wasm-plugin-icon: https://img.alicdn.com/imgextra/i3/O1CN01bAFa9k1t1gdQcVTH0_!!6000000005842-2-tps-42-42.png higress.io/wasm-plugin-title: Transformer creationTimestamp: "2025-02-19T09:22:10Z" generation: 1 labels: higress.io/resource-definer: higress higress.io/wasm-plugin-built-in: "true" higress.io/wasm-plugin-category: transform higress.io/wasm-plugin-name: transformer higress.io/wasm-plugin-version: 1.0.0 name: transformer-1.0.0 namespace: higress-system resourceVersion: "37965942" uid: 631c791d-18ac-4e66-bb76-ba9e7ef8bd48 spec: defaultConfig: respRules: - body: - key: foo.bar value: value operate: add defaultConfigDisable: false failStrategy: FAIL_OPEN matchRules: [] phase: AUTHN priority: 410 url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/transformer:1.0.0 单路由: `apiVersion: extensions.higress.io/v1alpha1 kind: WasmPlugin metadata: annotations: higress.io/wasm-plugin-description: Convert request/response headers, request query parameters, and request/response body parameters. higress.io/wasm-plugin-icon: https://img.alicdn.com/imgextra/i3/O1CN01bAFa9k1t1gdQcVTH0_!!6000000005842-2-tps-42-42.png higress.io/wasm-plugin-title: Transformer creationTimestamp: "2025-02-19T08:14:50Z" generation: 6 labels: higress.io/resource-definer: higress higress.io/wasm-plugin-built-in: "true" higress.io/wasm-plugin-category: transform higress.io/wasm-plugin-name: transformer higress.io/wasm-plugin-version: 1.0.0 name: transformer-1.0.0 namespace: higress-system resourceVersion: "37953239" uid: ddc07bf6-fe98-44a1-b4c7-c4ffc21d5d82 spec: defaultConfigDisable: true failStrategy: FAIL_OPEN matchRules:

  • config: reqRules:
    • headers:
      • key: X-model-type value: image operate: add configDisable: false ingress:
    • stabilityai-stable-diffusion-3-medium phase: AUTHN priority: 410 `

按照上面的配置在返回和请求的信息里都没有期望的字段。

控制台日志:

2025-02-19T08:50:30.438014Z info ads full push happen, reason:map[config:1] 2025-02-19T08:50:30.538564Z info ads Push debounce stable[124] 1 for config WasmPlugin/higress-system/transformer-1.0.0-wasmplugin: 100.339692ms since last change, 100.339395ms since last push, full=true 2025-02-19T08:50:30.539183Z info ingress resource type extensions.istio.io/v1alpha1/WasmPlugin, ingress number 7, convert configs number 7 2025-02-19T08:50:30.540989Z info ads XDS: Pushing Services:0 ConnectedEndpoints:1 Version:2025-02-19T08:50:30Z/124 2025-02-19T08:50:30.541113Z info ingress controller tracing ConstructEnvoyFilters 2025-02-19T08:50:30.541167Z info ingress controller gzip ConstructEnvoyFilters 2025-02-19T08:50:30.541174Z info ingress controller global-option ConstructEnvoyFilters 2025-02-19T08:50:30.541420Z info ingress Append 1 configmap EnvoyFilters 2025-02-19T08:50:30.541434Z info ingress resource type networking.istio.io/v1alpha3/EnvoyFilter, configs number 1 2025-02-19T08:50:30.541605Z info ads networking.istio.io/v1alpha3/EnvoyFilter: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:1 size:838B 2025-02-19T08:50:30.545567Z info ingress resource type networking.istio.io/v1alpha3/Gateway, ingress number 7, convert configs number 4 2025-02-19T08:50:30.545773Z info ads networking.istio.io/v1alpha3/Gateway: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:4 size:1.3kB 2025-02-19T08:50:30.545812Z info ads security.istio.io/v1beta1/PeerAuthentication: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.545837Z info ads security.istio.io/v1beta1/RequestAuthentication: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.546221Z info ingress Found mcp serviceEntries [0xc0003ee9a0 0xc000430930 0xc00080e000] 2025-02-19T08:50:30.546246Z info ingress resource type networking.istio.io/v1alpha3/ServiceEntry, ingress number 7, convert configs number 3 2025-02-19T08:50:30.546350Z info ads networking.istio.io/v1alpha3/ServiceEntry: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:3 size:793B 2025-02-19T08:50:30.546381Z info ads networking.istio.io/v1alpha3/WorkloadEntry: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.546762Z info ingress resource type networking.istio.io/v1alpha3/DestinationRule, ingress number 7, convert configs number 0 2025-02-19T08:50:30.546808Z info ads networking.istio.io/v1alpha3/DestinationRule: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.546833Z info ads networking.istio.io/v1alpha3/WorkloadGroup: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.546856Z info ads security.istio.io/v1beta1/AuthorizationPolicy: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.546879Z info ads networking.istio.io/v1beta1/ProxyConfig: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.546900Z info ads networking.istio.io/v1alpha3/Sidecar: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.546923Z info ads telemetry.istio.io/v1alpha1/Telemetry: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:0 size:0B 2025-02-19T08:50:30.547538Z info ingress Found 0 number of basic auth 2025-02-19T08:50:30.547555Z info ingress Found 0 number of envoyFilters 2025-02-19T08:50:30.547564Z info ingress resource type networking.istio.io/v1alpha3/VirtualService, ingress number 7, convert configs number 4 2025-02-19T08:50:30.547725Z info ads networking.istio.io/v1alpha3/VirtualService: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:4 size:2.0kB 2025-02-19T08:50:30.548029Z info ingress resource type extensions.istio.io/v1alpha1/WasmPlugin, ingress number 7, convert configs number 7 2025-02-19T08:50:30.548913Z info ads extensions.istio.io/v1alpha1/WasmPlugin: PUSH for node:higress-controller-6b59c6d776-sjp8v.higress-system resources:7 size:12.6kB

jingzhe6414 avatar Feb 19 '25 09:02 jingzhe6414