From c08a5a9f4a080d9d3d536a527100efc21f2fbc21 Mon Sep 17 00:00:00 2001 From: Renuka Fernando Date: Tue, 18 Oct 2022 18:24:11 +0530 Subject: [PATCH] Add resource name mapping for rate limit xDS resource Signed-off-by: Renuka Fernando --- pkg/cache/v3/resource.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/cache/v3/resource.go b/pkg/cache/v3/resource.go index c220b24e55..f27380f71d 100644 --- a/pkg/cache/v3/resource.go +++ b/pkg/cache/v3/resource.go @@ -31,6 +31,7 @@ import ( "github.com/envoyproxy/go-control-plane/pkg/cache/types" "github.com/envoyproxy/go-control-plane/pkg/resource/v3" "github.com/envoyproxy/go-control-plane/pkg/wellknown" + ratelimit "github.com/envoyproxy/go-control-plane/ratelimit/config/ratelimit/v3" ) // GetResponseType returns the enumeration for a valid xDS type URL. @@ -109,6 +110,8 @@ func GetResourceName(res types.Resource) string { return v.GetName() case *core.TypedExtensionConfig: return v.GetName() + case *ratelimit.RateLimitConfig: + return v.GetDomain() default: return "" }