From 206840b6cdd9ad63c01d3330f1f94b2aa7be0b56 Mon Sep 17 00:00:00 2001 From: spacewander Date: Fri, 15 Mar 2024 19:27:40 +0800 Subject: [PATCH] drop EnvoyFilter Context Signed-off-by: spacewander --- controller/internal/istio/envoyfilter.go | 3 --- controller/internal/istio/testdata/default_filters.yml | 5 ----- .../translation/testdata/plugins/bandwidth_limit.out.yml | 1 - .../internal/translation/testdata/plugins/buffer.out.yml | 1 - .../internal/translation/testdata/plugins/cors.out.yml | 1 - .../internal/translation/testdata/plugins/fault.out.yml | 1 - .../internal/translation/testdata/plugins/inner_lua.out.yml | 1 - .../translation/testdata/plugins/local_ratelimit.out.yml | 1 - .../internal/translation/testdata/plugins/outer_lua.out.yml | 1 - 9 files changed, 15 deletions(-) diff --git a/controller/internal/istio/envoyfilter.go b/controller/internal/istio/envoyfilter.go index 9c9288b5..3a8567e8 100644 --- a/controller/internal/istio/envoyfilter.go +++ b/controller/internal/istio/envoyfilter.go @@ -58,7 +58,6 @@ func DefaultEnvoyFilters() map[string]*istiov1a3.EnvoyFilter { // And user-defined envoy filter won't apply to mesh because: // 1. We don't support attaching policy to mesh. // 2. Mesh configuration doesn't have Go HTTP filter. - Context: istioapi.EnvoyFilter_GATEWAY, ObjectTypes: &istioapi.EnvoyFilter_EnvoyConfigObjectMatch_Listener{ Listener: &istioapi.EnvoyFilter_ListenerMatch{ FilterChain: &istioapi.EnvoyFilter_ListenerMatch_FilterChainMatch{ @@ -120,7 +119,6 @@ func DefaultEnvoyFilters() map[string]*istiov1a3.EnvoyFilter { patches = append(patches, &istioapi.EnvoyFilter_EnvoyConfigObjectPatch{ ApplyTo: istioapi.EnvoyFilter_HTTP_FILTER, Match: &istioapi.EnvoyFilter_EnvoyConfigObjectMatch{ - Context: istioapi.EnvoyFilter_GATEWAY, ObjectTypes: &istioapi.EnvoyFilter_EnvoyConfigObjectMatch_Listener{ Listener: &istioapi.EnvoyFilter_ListenerMatch{ FilterChain: &istioapi.EnvoyFilter_ListenerMatch_FilterChainMatch{ @@ -223,7 +221,6 @@ func GenerateConsumers(consumers map[string]interface{}) *istiov1a3.EnvoyFilter { ApplyTo: istioapi.EnvoyFilter_HTTP_FILTER, Match: &istioapi.EnvoyFilter_EnvoyConfigObjectMatch{ - Context: istioapi.EnvoyFilter_GATEWAY, ObjectTypes: &istioapi.EnvoyFilter_EnvoyConfigObjectMatch_Listener{ Listener: &istioapi.EnvoyFilter_ListenerMatch{ FilterChain: &istioapi.EnvoyFilter_ListenerMatch_FilterChainMatch{ diff --git a/controller/internal/istio/testdata/default_filters.yml b/controller/internal/istio/testdata/default_filters.yml index b3f7b061..33bed07a 100644 --- a/controller/internal/istio/testdata/default_filters.yml +++ b/controller/internal/istio/testdata/default_filters.yml @@ -5,7 +5,6 @@ configPatches: - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: @@ -24,7 +23,6 @@ plugin_name: fm - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: @@ -41,7 +39,6 @@ statPrefix: http_local_rate_limiter - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: @@ -58,7 +55,6 @@ statPrefix: http_local_rate_limiter - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: @@ -75,7 +71,6 @@ statPrefix: http_local_rate_limiter - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: diff --git a/controller/internal/translation/testdata/plugins/bandwidth_limit.out.yml b/controller/internal/translation/testdata/plugins/bandwidth_limit.out.yml index 2f6701ae..3d4d6459 100644 --- a/controller/internal/translation/testdata/plugins/bandwidth_limit.out.yml +++ b/controller/internal/translation/testdata/plugins/bandwidth_limit.out.yml @@ -28,7 +28,6 @@ configPatches: - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: diff --git a/controller/internal/translation/testdata/plugins/buffer.out.yml b/controller/internal/translation/testdata/plugins/buffer.out.yml index 706a7336..49ee664b 100644 --- a/controller/internal/translation/testdata/plugins/buffer.out.yml +++ b/controller/internal/translation/testdata/plugins/buffer.out.yml @@ -26,7 +26,6 @@ configPatches: - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: diff --git a/controller/internal/translation/testdata/plugins/cors.out.yml b/controller/internal/translation/testdata/plugins/cors.out.yml index 67df0b86..d4148ba9 100644 --- a/controller/internal/translation/testdata/plugins/cors.out.yml +++ b/controller/internal/translation/testdata/plugins/cors.out.yml @@ -28,7 +28,6 @@ configPatches: - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: diff --git a/controller/internal/translation/testdata/plugins/fault.out.yml b/controller/internal/translation/testdata/plugins/fault.out.yml index b32f8c2c..1ed6a36e 100644 --- a/controller/internal/translation/testdata/plugins/fault.out.yml +++ b/controller/internal/translation/testdata/plugins/fault.out.yml @@ -29,7 +29,6 @@ configPatches: - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: diff --git a/controller/internal/translation/testdata/plugins/inner_lua.out.yml b/controller/internal/translation/testdata/plugins/inner_lua.out.yml index e1e9c980..03934c5c 100644 --- a/controller/internal/translation/testdata/plugins/inner_lua.out.yml +++ b/controller/internal/translation/testdata/plugins/inner_lua.out.yml @@ -33,7 +33,6 @@ configPatches: - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: diff --git a/controller/internal/translation/testdata/plugins/local_ratelimit.out.yml b/controller/internal/translation/testdata/plugins/local_ratelimit.out.yml index 5380a080..b968c30d 100644 --- a/controller/internal/translation/testdata/plugins/local_ratelimit.out.yml +++ b/controller/internal/translation/testdata/plugins/local_ratelimit.out.yml @@ -27,7 +27,6 @@ configPatches: - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: diff --git a/controller/internal/translation/testdata/plugins/outer_lua.out.yml b/controller/internal/translation/testdata/plugins/outer_lua.out.yml index 972fbf7d..1d2784eb 100644 --- a/controller/internal/translation/testdata/plugins/outer_lua.out.yml +++ b/controller/internal/translation/testdata/plugins/outer_lua.out.yml @@ -33,7 +33,6 @@ configPatches: - applyTo: HTTP_FILTER match: - context: GATEWAY listener: filterChain: filter: