From ca2c14293ee78da777fe037733d8ce969ede1719 Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Mon, 1 Mar 2021 19:16:52 +0000 Subject: [PATCH] dubbo: support wildcard match for dubbo interface (#15121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support wildcard match、suffix match and prefix match for dubbo interface name. Check #14765 get more information. Risk Level: Low Testing: Unit Test Fixes #14765 Signed-off-by: wbpcode Mirrored from https://github.com/envoyproxy/envoy @ 9c2d5360635b46cc6ce4832ac84a9c324162629f --- .../filters/network/dubbo_proxy/v3/route.proto | 10 +++++++++- .../filters/network/dubbo_proxy/v4alpha/route.proto | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto b/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto index f06518c0..e255985e 100644 --- a/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto +++ b/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto @@ -26,7 +26,15 @@ message RouteConfiguration { // The name of the route configuration. Reserved for future use in asynchronous route discovery. string name = 1; - // The interface name of the service. + // The interface name of the service. Wildcard interface are supported in the suffix or prefix form. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add``, ``com.prod.methods.add``, etc. + // ``com.dev.methods.*`` will match ``com.dev.methods.add``, ``com.dev.methods.update``, etc. + // Special wildcard ``*`` matching any interface. + // + // .. note:: + // + // The wildcard will not match the empty string. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add`` but not ``.methods.add``. string interface = 2; // Which group does the interface belong to. diff --git a/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto b/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto index c2ff03b3..d6314279 100644 --- a/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto +++ b/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto @@ -26,7 +26,15 @@ message RouteConfiguration { // The name of the route configuration. Reserved for future use in asynchronous route discovery. string name = 1; - // The interface name of the service. + // The interface name of the service. Wildcard interface are supported in the suffix or prefix form. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add``, ``com.prod.methods.add``, etc. + // ``com.dev.methods.*`` will match ``com.dev.methods.add``, ``com.dev.methods.update``, etc. + // Special wildcard ``*`` matching any interface. + // + // .. note:: + // + // The wildcard will not match the empty string. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add`` but not ``.methods.add``. string interface = 2; // Which group does the interface belong to.