Skip to content

Commit d3964d3

Browse files
authored
update EnvoyFilter CEL (#3589)
1 parent f6b4b4f commit d3964d3

File tree

4 files changed

+36
-5
lines changed

4 files changed

+36
-5
lines changed

kubernetes/customresourcedefinitions.gen.yaml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/envoy_filter.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/envoy_filter.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ message EnvoyFilter {
880880

881881
// One or more match conditions to be met before a patch is applied
882882
// to the generated configuration for a given proxy.
883-
// +kubebuilder:validation:XValidation:message="only support waypointMatch when context is WAYPOINT",rule="(self.context == 'WAYPOINT' && has(self.waypoint)) || (self.context != 'WAYPOINT' && !has(self.waypoint))"
883+
// +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)"
884884
message EnvoyConfigObjectMatch {
885885
// The specific config generation context to match on. istiod
886886
// generates envoy configuration in the context of a gateway,

tests/testdata/envoyfilter-valid.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
apiVersion: networking.istio.io/v1alpha3
22
kind: EnvoyFilter
3+
metadata:
4+
name: http-filter
5+
spec:
6+
configPatches:
7+
- applyTo: HTTP_FILTER
8+
match:
9+
# context omitted so that this applies to both sidecars and gateways
10+
listener:
11+
filterChain:
12+
filter:
13+
name: "envoy.filters.network.http_connection_manager"
14+
patch:
15+
operation: INSERT_FIRST
16+
value:
17+
name: envoy.filters.http.ext_proc
18+
typed_config:
19+
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor
20+
failure_mode_allow: false
21+
allow_mode_override: true
22+
processing_mode:
23+
request_header_mode: "SEND"
24+
response_header_mode: "SKIP"
25+
request_body_mode: "FULL_DUPLEX_STREAMED"
26+
response_body_mode: "NONE"
27+
request_trailer_mode: "SEND"
28+
response_trailer_mode: "SKIP"
29+
grpc_service:
30+
envoy_grpc:
31+
cluster_name: fake-cluster
32+
---
33+
apiVersion: networking.istio.io/v1alpha3
34+
kind: EnvoyFilter
335
metadata:
436
name: waypoint-http-filter
537
spec:

0 commit comments

Comments
 (0)