feat: 添加搜索收藏微服务

This commit is contained in:
zetaloop
2026-04-24 13:24:58 +08:00
parent 91fdd2a498
commit 53d0e791b4
58 changed files with 6239 additions and 57 deletions
+64
View File
@@ -224,6 +224,32 @@ static_resources:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
disabled: true
- match:
path: /api/v1/search
headers:
- name: ":method"
exact_match: GET
route:
cluster: search_api_cluster
timeout: 30s
typed_per_filter_config:
envoy.filters.http.ext_authz:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
disabled: true
- match:
prefix: /api/v1/recommendations
headers:
- name: ":method"
exact_match: GET
route:
cluster: search_api_cluster
timeout: 30s
typed_per_filter_config:
envoy.filters.http.ext_authz:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
disabled: true
- match:
prefix: /api/v1/posts
headers:
@@ -249,6 +275,14 @@ static_resources:
cluster: user_api_cluster
timeout: 30s
- match:
safe_regex:
google_re2: {}
regex: "^/api/v1/users/[0-9]+/favorites/check$"
route:
cluster: search_api_cluster
timeout: 30s
- match:
prefix: /api/v1/users
route:
@@ -377,6 +411,12 @@ static_resources:
cluster: notification_api_cluster
timeout: 30s
- match:
prefix: /api/v1/favorites
route:
cluster: search_api_cluster
timeout: 30s
- match:
prefix: /
direct_response:
@@ -633,6 +673,16 @@ static_resources:
headers:
- name: ":method"
exact_match: GET
- match:
path: /api/v1/search
headers:
- name: ":method"
exact_match: GET
- match:
path: /api/v1/recommendations/home
headers:
- name: ":method"
exact_match: GET
- match:
prefix: /api/v1
requires:
@@ -838,6 +888,20 @@ static_resources:
address: notification-api
port_value: 8888
- name: search_api_cluster
connect_timeout: 2s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: search_api_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: search-api
port_value: 8888
- name: authz_adapter_cluster
connect_timeout: 0.5s
type: STRICT_DNS