Hi,
I’m trying to add an EnvoyFilter. Although i provided the required “routeConfiguration” object under “configPatches.match”, i still got the below error.
“Invalid value: “”: “spec.configPatches.match” must validate one and only one schema (oneOf). Found none valid.”
“spec.configPatches.match.listener: Required value”
according to the docs, it can be either listener, route configuration, or cluster. https://istio.io/docs/reference/config/networking/envoy-filter/#EnvoyFilter-EnvoyConfigObjectMatch
I’m basically stuck Any help will be appreciated, thanks
Erkan
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: cache-agent-routing
namespace: default
spec:
workloadSelector:
labels:
app: suggestion-api
configPatches:
- applyTo: ROUTE_CONFIGURATION
match:
context: SIDECAR_INBOUND
routeConfiguration:
portNumber: 8080
vhost:
name: "suggestion-api.*:8080"
patch:
operation: MERGE
value:
routes:
- match:
- prefix: "/service/1"
headers:
- name: "x-use-cache"
exact_match: "true"
route:
cluster: cache-agent
- applyTo: CLUSTER
match:
context: SIDECAR_INBOUND
patch:
operation: ADD
value:
name: "cache-agent"
type: STATIC
connect_timeout: 0.5s
lb_policy: ROUND_ROBIN
hosts:
- socket_address:
protocol: HTTP
address: 127.0.0.1
port_value: 8081