fix: api descript

This commit is contained in:
wwweww
2026-02-28 05:33:16 +08:00
parent 5930fb0dde
commit d2f33b4b96
243 changed files with 37065 additions and 780 deletions
+416 -1
View File
@@ -67,6 +67,36 @@ data:
envoy.filters.http.ext_authz:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
disabled: true
- match:
path: /api/v1/auth/forgot-password
route:
cluster: user_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:
path: /api/v1/auth/reset-password
route:
cluster: user_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:
path: /api/v1/auth/forgot-password/send
route:
cluster: email_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/users
@@ -87,7 +117,123 @@ data:
envoy.filters.http.ext_authz:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
disabled: true
- match:
prefix: /api/v1/email
route:
cluster: email_api_cluster
timeout: 30s
- match:
prefix: /api/v1/auth
route:
cluster: user_api_cluster
timeout: 30s
# ===== 未来按服务拆分路由(服务未落地前先注释) =====
# - match:
# prefix: /api/v1/games
# route:
# cluster: game_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/orders
# route:
# cluster: order_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/players
# route:
# cluster: player_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/services
# route:
# cluster: player_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/shops
# route:
# cluster: shop_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/wallet
# route:
# cluster: wallet_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/disputes
# route:
# cluster: dispute_api_cluster
# timeout: 30s
# - match:
# safe_regex:
# google_re2: {}
# regex: "^/api/v1/orders/[^/]+/dispute$"
# route:
# cluster: dispute_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/reviews
# route:
# cluster: review_api_cluster
# timeout: 30s
# - match:
# safe_regex:
# google_re2: {}
# regex: "^/api/v1/orders/[^/]+/review(s)?$"
# route:
# cluster: review_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/posts
# route:
# cluster: community_api_cluster
# timeout: 30s
# - match:
# safe_regex:
# google_re2: {}
# regex: "^/api/v1/comments/[^/]+/like$"
# route:
# cluster: community_api_cluster
# timeout: 30s
# - match:
# path: /api/v1/search
# route:
# cluster: search_api_cluster
# timeout: 30s
# - match:
# path: /api/v1/recommendations/home
# route:
# cluster: search_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/notifications
# route:
# cluster: notification_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/chat
# route:
# cluster: chat_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/upload
# route:
# cluster: objectstory_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/files
# route:
# cluster: objectstory_api_cluster
# timeout: 30s
- match:
prefix: /api/v1
route:
cluster: user_api_cluster
timeout: 30s
- match:
prefix: /api/email
route:
@@ -245,12 +391,112 @@ data:
rules:
- match:
path: "/healthz"
- match:
prefix: "/api/v1"
headers:
- name: ":method"
exact_match: "OPTIONS"
- match:
path: "/api/v1/auth/login"
- match:
path: "/api/v1/auth/register"
- match:
path: "/api/v1/auth/forgot-password"
- match:
path: "/api/v1/auth/reset-password"
- match:
path: "/api/v1/auth/forgot-password/send"
- match:
path: "/api/v1/email/verification-code/send"
- match:
prefix: "/api/v1/games"
headers:
- name: ":method"
exact_match: "GET"
- match:
prefix: "/api/v1/players"
headers:
- name: ":method"
exact_match: "GET"
- match:
prefix: "/api/v1/services"
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/posts"
headers:
- name: ":method"
exact_match: "GET"
- match:
prefix: "/api/v1/reviews"
headers:
- name: ":method"
exact_match: "GET"
- match:
path: "/api/v1/shops"
headers:
- name: ":method"
exact_match: "GET"
- match:
safe_regex:
google_re2: {}
regex: "^/api/v1/shops/[^/]+$"
headers:
- name: ":method"
exact_match: "GET"
- match:
safe_regex:
google_re2: {}
regex: "^/api/v1/shops/[^/]+/players$"
headers:
- name: ":method"
exact_match: "GET"
- match:
safe_regex:
google_re2: {}
regex: "^/api/v1/users/[^/]+$"
headers:
- name: ":method"
exact_match: "GET"
- match:
safe_regex:
google_re2: {}
regex: "^/api/v1/users/[^/]+/posts$"
headers:
- name: ":method"
exact_match: "GET"
- match:
safe_regex:
google_re2: {}
regex: "^/api/v1/users/[^/]+/reviews$"
headers:
- name: ":method"
exact_match: "GET"
- match:
safe_regex:
google_re2: {}
regex: "^/api/v1/users/[^/]+/shop$"
headers:
- name: ":method"
exact_match: "GET"
- match:
prefix: "/api/v1"
requires:
provider_name: juwan_user_jwt
- match:
prefix: "/api/users"
requires:
@@ -305,6 +551,175 @@ data:
socket_address:
address: email-api-svc.juwan.svc.cluster.local
port_value: 8888
# ===== 未来服务集群预留(当前未实现,先注释) =====
# - name: game_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: game_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: game-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: objectstory_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: objectstory_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: objectstory-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: order_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: order_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: order-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: player_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: player_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: player-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: shop_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: shop_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: shop-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: wallet_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: wallet_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: wallet-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: dispute_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: dispute_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: dispute-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: review_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: review_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: review-api-svc.juwan.svc.cluster.local
# 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-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: community_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: community_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: community-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: notification_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: notification_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: notification-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: chat_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: chat_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: chat-api-svc.juwan.svc.cluster.local
# port_value: 8888
- name: authz_adapter_cluster
connect_timeout: 0.5s
+14
View File
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Secret
metadata:
name: email-smtp-secret
namespace: juwan
type: Opaque
data:
EMAIL_SMTP_HOST: c210cC4xNjMuY29t
EMAIL_SMTP_PORT: NDY1
EMAIL_SMTP_USERNAME: Y2h1cm9uZzI2NDZAMTYzLmNvbQ==
EMAIL_SMTP_PASSWORD: R1R2NkM2cU5idjV1ckFpRA==
EMAIL_FROM_ADDRESS: Y2h1cm9uZzI2NDZAMTYzLmNvbQ==
EMAIL_FROM_NAME: 6IGa546p
EMAIL_REPLY_TO: Y2h1cm9uZzI2NDZAMTYzLmNvbQ==
+1
View File
@@ -21,6 +21,7 @@ spec:
- name: email-api
# image: 103.236.53.208:4418/library/email-api@sha256:fe5c66f5bcb1a39652620df42351de3e48227920a34be3110a45eb13db327020
image: email-api:latest
imagePullPolicy: Always
ports:
- containerPort: 8888
- containerPort: 4001
+37
View File
@@ -26,6 +26,43 @@ spec:
- name: email-consumer
# image: 103.236.53.208:4418/library/email-mq@sha256:a9f76e8f4a17d1c00cefc429962037550e17feebb5cf38b28d360c91c8ba3e68
image: email-mq:latest
imagePullPolicy: Always
env:
- name: EMAIL_SMTP_HOST
valueFrom:
secretKeyRef:
name: email-smtp-secret
key: EMAIL_SMTP_HOST
- name: EMAIL_SMTP_PORT
valueFrom:
secretKeyRef:
name: email-smtp-secret
key: EMAIL_SMTP_PORT
- name: EMAIL_SMTP_USERNAME
valueFrom:
secretKeyRef:
name: email-smtp-secret
key: EMAIL_SMTP_USERNAME
- name: EMAIL_SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: email-smtp-secret
key: EMAIL_SMTP_PASSWORD
- name: EMAIL_FROM_ADDRESS
valueFrom:
secretKeyRef:
name: email-smtp-secret
key: EMAIL_FROM_ADDRESS
- name: EMAIL_FROM_NAME
valueFrom:
secretKeyRef:
name: email-smtp-secret
key: EMAIL_FROM_NAME
- name: EMAIL_REPLY_TO
valueFrom:
secretKeyRef:
name: email-smtp-secret
key: EMAIL_REPLY_TO
ports:
- containerPort: 4001
resources:
+1 -1
View File
@@ -10,7 +10,7 @@ spec:
revisionHistoryLimit: 5
selector:
matchLabels:
app: user-rpc
app: user-rpc # .Name
template:
metadata:
labels: