Skip to content

Commit 9cd9451

Browse files
author
georgeji
committed
feat(consul): filter nodes in upstream with metadata
1 parent 2e7a2df commit 9cd9451

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/en/latest/discovery/consul.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,13 @@ Example of routing a request with metadata filtering:
249249
```shell
250250
$ curl http://127.0.0.1:9180/apisix/admin/routes/5 -H "X-API-KEY: $admin_key" -X PUT -i -d '
251251
{
252-
"uri": "/nacosWithMetadata/*",
252+
"uri": "/consulWithMetadata/*",
253253
"upstream": {
254-
"service_name": "APISIX-NACOS",
254+
"service_name": "APISIX-CONSUL",
255255
"type": "roundrobin",
256-
"discovery_type": "nacos",
256+
"discovery_type": "consul",
257257
"discovery_args": {
258-
"metadata": {
258+
"metadata_match": {
259259
"version": ["v1", "v2"]
260260
}
261261
}
@@ -270,13 +270,13 @@ For multiple metadata criteria:
270270
```shell
271271
$ curl http://127.0.0.1:9180/apisix/admin/routes/6 -H "X-API-KEY: $admin_key" -X PUT -i -d '
272272
{
273-
"uri": "/nacosWithMultipleMetadata/*",
273+
"uri": "/consulWithMultipleMetadata/*",
274274
"upstream": {
275-
"service_name": "APISIX-NACOS",
275+
"service_name": "APISIX-CONSUL",
276276
"type": "roundrobin",
277-
"discovery_type": "nacos",
277+
"discovery_type": "consul",
278278
"discovery_args": {
279-
"metadata": {
279+
"metadata_match": {
280280
"lane": ["a"],
281281
"env": ["prod"]
282282
}

0 commit comments

Comments
 (0)