From 3643b7d23bb7eb340f532f31723b34acec24d93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Wed, 27 Apr 2022 14:52:55 +0200 Subject: [PATCH] Fix resource.Ref eq. check to properly handle wildcard paths --- pkg/envoy/resource/types.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/envoy/resource/types.go b/pkg/envoy/resource/types.go index 95a52d2db..4acabf550 100644 --- a/pkg/envoy/resource/types.go +++ b/pkg/envoy/resource/types.go @@ -215,6 +215,14 @@ func (r *Ref) IsWildcard() bool { } func (a *Ref) equals(b *Ref) bool { + if a == nil && a == b { + return true + } + + if a == nil && a != b { + return false + } + if a.ResourceType != b.ResourceType { return false }