Skip to content

Commit 31eef02

Browse files
authored
doc: support stage backends (TencentBlueKing#172)
1 parent 5002e6a commit 31eef02

3 files changed

Lines changed: 35 additions & 9 deletions

File tree

sdks/apigw-manager/README.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,39 @@ stage:
118118
# vars:
119119
# key: "value"
120120
# 代理配置
121-
proxy_http:
122-
timeout: 60
123-
# 负载均衡类型 + Hosts
124-
upstreams:
125-
loadbalance: "roundrobin"
126-
hosts:
127-
# 网关调用后端服务的默认域名或IP,不包含Path,比如:http://api.example.com
128-
- host: ""
129-
weight: 100
121+
# proxy_http 与 backends 二选一, 推荐使用 backends 方式配置
122+
# 网关版本 <= 1.13.3, 只支持一个后端服务, 默认是 default
123+
# proxy_http:
124+
# timeout: 60
125+
# # 负载均衡类型 + Hosts
126+
# upstreams:
127+
# loadbalance: "roundrobin"
128+
# hosts:
129+
# # 网关调用后端服务的默认域名或IP,不包含Path,比如:http://api.example.com
130+
# - host: ""
131+
# weight: 100
132+
133+
# 网关版本 1.13.3之后引入 backends 配置方式,支持多后端服务
134+
# 注意: 资源中引用的 backend 一定要配置, 否则会导入失败,不配置则会选择 default 后端服务
135+
# 如果 backends 没有配置 default 且 resource 未指定 backend 则会导致版本发布校验失败
136+
backends:
137+
- name: "default"
138+
config:
139+
timeout: 60
140+
loadbalance: "roundrobin"
141+
hosts:
142+
# 网关调用后端服务的默认域名或IP,不包含Path,比如:http://api.example.com
143+
- host: ""
144+
weight: 100
145+
146+
- name: "service1"
147+
config:
148+
timeout: 60
149+
loadbalance: "roundrobin"
150+
hosts:
151+
- host: ""
152+
weight: 100
153+
130154
# 环境插件配置
131155
# plugin_configs:
132156
# - type: bk-rate-limit

sdks/apigw-manager/examples/chart/use-configmap/files/support-files/resources.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ paths:
2020
allowApplyPermission: false
2121
matchSubpath: false
2222
backend:
23+
# name: default 支持设置 backend, 默认不配置为 default,和 stage 的 backends 配置的后端服务 name 一致
2324
type: HTTP
2425
method: get
2526
path: /anything

sdks/apigw-manager/examples/chart/use-custom-docker-image/my-apigw-manager/support-files/resources.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ paths:
2020
allowApplyPermission: false
2121
matchSubpath: false
2222
backend:
23+
# name: default 支持设置 backend, 默认不配置为 default,和 stage 的 backends 配置的后端服务 name 一致
2324
type: HTTP
2425
method: get
2526
path: /anything

0 commit comments

Comments
 (0)