# istio_envoyfilter-invalid.yaml
_err: 'spec.configPatches[0].match: Invalid value: "object": only support waypointMatch when context is WAYPOINT'
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: waypoint-wrong-context
spec:
  configPatches:
    - applyTo: HTTP_FILTER
      match:
        context: SIDECAR_INBOUND
        waypoint:
          filter:
            name: "envoy.filters.network.http_connection_manager"
            subFilter:
              name: "envoy.filters.http.router"
---
_err: 'spec.configPatches[0].match: Invalid value: "object": only support waypointMatch when context is WAYPOINT'
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: waypoint-wrong-match
spec:
  configPatches:
    - applyTo: HTTP_FILTER
      match:
        context: WAYPOINT
        listener:
          filterChain:
            filter:
              name: "envoy.filters.network.http_connection_manager"
              subFilter:
                name: "envoy.filters.http.router"
---
_err: 'spec.configPatches[0].match.waypoint.portNumber: Invalid value: "integer": port must be between 1-65535'
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: waypoint-wrong-port
spec:
  configPatches:
    - applyTo: HTTP_FILTER
      match:
        context: WAYPOINT
        waypoint:
          portNumber: 65536
---