nic-6443 commented on code in PR #14054:
URL: https://github.com/apache/apisix/pull/14054#discussion_r4323370808


##########
docs/en/latest/plugins/traffic-split.md:
##########
@@ -64,6 +64,7 @@ The traffic ratio between Upstream services may be less 
accurate since round rob
 | rules.weighted_upstreams.upstream.pass_host             | string          | 
False    | "pass"     | ["pass", "node", "rewrite"] | Mode deciding how the 
host name is passed. `pass` passes the client's host name to the Upstream. 
`node` passes the host configured in the node of the Upstream. `rewrite` passes 
the value configured in `upstream_host`.             |
 | rules.weighted_upstreams.upstream.name                  | string         | 
False    |            |                             |  Identifier for the 
Upstream for specifying service name, usage scenarios, and so on.        |
 | rules.weighted_upstreams.upstream.upstream_host         | string         | 
False    |            |                             | Used when `pass_host` is 
`rewrite`. Host name of the Upstream.         |
+| rules.weighted_upstreams.upstream.tls                   | object         | 
False    |            |                             | TLS settings used when 
connecting to the Upstream, the same as `tls` of an 
[Upstream](../admin-api.md#upstream): `client_cert` and `client_key`, 
`client_cert_id`, `verify` and `ca_certs`. |

Review Comment:
   Good point, listing the fields here would drift from the Upstream schema. 
Changed it (EN and ZH) to just point at `tls` of Upstream for the supported 
fields, in f860c3657.



##########
apisix/upstream.lua:
##########
@@ -329,6 +329,55 @@ local function set_stream_upstream_client_cert(api_ctx, 
up_conf)
 end
 
 
+local function set_http_upstream_tls(api_ctx, up_conf)

Review Comment:
   Keeping the name. `http` here refers to the subsystem, not the scheme: grpcs 
is proxied by the http subsystem too, and the name is meant to contrast with 
the stream-side helpers in the same file (`set_stream_upstream_tls`, 
`set_stream_upstream_client_cert`). A plain `set_upstream_tls` would read as if 
it covered stream upstreams as well.



##########
t/plugin/traffic-split5.t:
##########
@@ -634,3 +634,209 @@ nginx_config:
 GET /t
 --- response_body
 passed.
+
+
+

Review Comment:
   Those are the three blank lines `utils/reindex` (run by `make lint`) 
requires between test blocks, the same separation used by every other block in 
this file, so I will leave them.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to