39 lines
720 B
YAML
39 lines
720 B
YAML
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: goalfymax-admin-web-route
|
|
namespace: goalfyagent
|
|
labels:
|
|
app: goalfymax-admin-web
|
|
spec:
|
|
# 指定父级 Gateway
|
|
parentRefs:
|
|
- name: ingress-gateway
|
|
namespace: istio-system
|
|
|
|
# 配置主机名
|
|
hostnames:
|
|
- "goalfymax-admin.goalfyai.com"
|
|
|
|
# 路由规则
|
|
rules:
|
|
# 前端静态文件路由
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /
|
|
backendRefs:
|
|
- name: goalfymax-admin-web
|
|
port: 80
|
|
weight: 100
|
|
|
|
# API 路由到后端服务
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /api/
|
|
backendRefs:
|
|
- name: goalfymax-admin
|
|
port: 8087
|
|
weight: 100
|