Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions kubernetes/customresourcedefinitions.gen.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion networking/v1alpha3/envoy_filter.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion networking/v1alpha3/envoy_filter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ message EnvoyFilter {

// One or more match conditions to be met before a patch is applied
// to the generated configuration for a given proxy.
// +kubebuilder:validation:XValidation:message="only support waypointMatch when context is WAYPOINT",rule="(self.context == 'WAYPOINT' && has(self.waypoint)) || (self.context != 'WAYPOINT' && !has(self.waypoint))"
// +kubebuilder:validation:XValidation:message="only support waypointMatch when context is WAYPOINT",rule="has(self.context) ? (self.context == 'WAYPOINT' ? has(self.waypoint) : !has(self.waypoint)) : !has(self.waypoint)"
message EnvoyConfigObjectMatch {
// The specific config generation context to match on. istiod
// generates envoy configuration in the context of a gateway,
Expand Down
32 changes: 32 additions & 0 deletions tests/testdata/envoyfilter-valid.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: http-filter
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
# context omitted so that this applies to both sidecars and gateways
listener:
filterChain:
filter:
name: "envoy.filters.network.http_connection_manager"
patch:
operation: INSERT_FIRST
value:
name: envoy.filters.http.ext_proc
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor
failure_mode_allow: false
allow_mode_override: true
processing_mode:
request_header_mode: "SEND"
response_header_mode: "SKIP"
request_body_mode: "FULL_DUPLEX_STREAMED"
response_body_mode: "NONE"
request_trailer_mode: "SEND"
response_trailer_mode: "SKIP"
grpc_service:
envoy_grpc:
cluster_name: fake-cluster
---
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: waypoint-http-filter
spec:
Expand Down