Closed YonkaFang closed 11 months ago
使用方式如下:
# namespace: ns1 - enable: true name: fault-injection rider: settings: delay: delaySwitch: true delayTime: 3000 error: errorSwitch: false typeUrl: type.googleapis.com/proxy.filters.http.rider.v3alpha1.RouteFilterConfig - enable: true name: fault-injection typeUrl: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.RoutePluginConfig wasm: settings: blockRules: - .* caseInsensitive: false rejectedCode: "422"
输出envoyfilter如下:
- applyTo: HTTP_ROUTE match: context: SIDECAR_OUTBOUND routeConfiguration: vhost: name: nsf-demo-stock-viewer-sidecar.skiff-nsfdemo-sidecar.svc.cluster.local:80 route: name: myroute patch: operation: MERGE value: typedPerFilterConfig: ns1.fault-injection.rider: '@type': type.googleapis.com/udpa.type.v1.TypedStruct type_url: type.googleapis.com/proxy.filters.http.rider.v3alpha1.RouteFilterConfig value: plugins: - config: delay: delaySwitch: true delayTime: 3000 error: errorSwitch: false name: fault-injection - applyTo: HTTP_ROUTE match: context: SIDECAR_OUTBOUND routeConfiguration: vhost: name: nsf-demo-stock-viewer-sidecar.skiff-nsfdemo-sidecar.svc.cluster.local:80 route: name: myroute patch: operation: MERGE value: typedPerFilterConfig: ns1.fault-injection: '@type': type.googleapis.com/udpa.type.v1.TypedStruct type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.RoutePluginConfig value: configuration: '@type': type.googleapis.com/google.protobuf.StringValue value: '{"blockRules":[".*"],"caseInsensitive":false,"rejectedCode":"422"}'
使用方式如下:
输出envoyfilter如下: