Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: huabing zhao <[email protected]>
  • Loading branch information
zhaohuabing committed Mar 14, 2024
1 parent 8a8e841 commit 2a1b778
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
maxConcurrentStreams: 100
httpFilters:
- disabled: true
name: envoy.filters.http.basic_auth_first-route
name: envoy.filters.http.basic_auth/first-route
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.basic_auth.v3.BasicAuth
users:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.basic_auth_first-route:
envoy.filters.http.basic_auth/first-route:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
config: {}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
maxConcurrentStreams: 100
httpFilters:
- disabled: true
name: envoy.filters.http.ext_authz_default/httproute-1
name: envoy.filters.http.ext_authz/default/httproute-1
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
httpService:
Expand All @@ -30,7 +30,7 @@
uri: http://http-backend.envoy-gateway:80/auth
transportApiVersion: V3
- disabled: true
name: envoy.filters.http.ext_authz_default/gateway-1
name: envoy.filters.http.ext_authz/default/gateway-1
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
allowedHeaders:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.ext_authz_default/httproute-1:
envoy.filters.http.ext_authz/default/httproute-1:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
config: {}
- match:
Expand All @@ -24,7 +24,7 @@
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.ext_authz_default/httproute-1:
envoy.filters.http.ext_authz/default/httproute-1:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
config: {}
- match:
Expand All @@ -35,6 +35,6 @@
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.ext_authz_default/gateway-1:
envoy.filters.http.ext_authz/default/gateway-1:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
config: {}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
maxConcurrentStreams: 100
httpFilters:
- disabled: true
name: envoy.filters.http.oauth2_first-route
name: envoy.filters.http.oauth2/first-route
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.oauth2.v3.OAuth2
config:
Expand Down Expand Up @@ -56,7 +56,7 @@
timeout: 10s
uri: https://oauth.foo.com/token
- disabled: true
name: envoy.filters.http.oauth2_second-route
name: envoy.filters.http.oauth2/second-route
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.oauth2.v3.OAuth2
config:
Expand Down
4 changes: 2 additions & 2 deletions internal/xds/translator/testdata/out/xds-ir/oidc.routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.oauth2_first-route:
envoy.filters.http.oauth2/first-route:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
config: {}
- match:
Expand All @@ -24,6 +24,6 @@
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.oauth2_second-route:
envoy.filters.http.oauth2/second-route:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
config: {}
2 changes: 1 addition & 1 deletion internal/xds/translator/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func enableFilterOnRoute(route *routev3.Route, filterName string) error {

// perRouteFilterName generates a unique filter name for the provided filterType and configName.
func perRouteFilterName(filterType, configName string) string {
return fmt.Sprintf("%s_%s", filterType, configName)
return fmt.Sprintf("%s/%s", filterType, configName)
}

func hcmContainsFilter(mgr *hcmv3.HttpConnectionManager, filterName string) bool {
Expand Down

0 comments on commit 2a1b778

Please sign in to comment.