From 9a2ac850776f0b5ac0987d5e1a685baa6ee76d48 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Mon, 20 Nov 2023 17:26:27 +0000 Subject: [PATCH] Consider GroupVersionKind when matching resources This change shall take Group, Version and Kind from GroupVersionKind into consideration instead of the current behavior of only considering the Kind Closes: #12578 Signed-off-by: MichaelMorris --- pkg/kube/resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kube/resource.go b/pkg/kube/resource.go index 600f256b3..d88b171f0 100644 --- a/pkg/kube/resource.go +++ b/pkg/kube/resource.go @@ -81,5 +81,5 @@ func (r ResourceList) Intersect(rs ResourceList) ResourceList { // isMatchingInfo returns true if infos match on Name and GroupVersionKind. func isMatchingInfo(a, b *resource.Info) bool { - return a.Name == b.Name && a.Namespace == b.Namespace && a.Mapping.GroupVersionKind.Kind == b.Mapping.GroupVersionKind.Kind && a.Mapping.GroupVersionKind.Group == b.Mapping.GroupVersionKind.Group + return a.Name == b.Name && a.Namespace == b.Namespace && a.Mapping.GroupVersionKind == b.Mapping.GroupVersionKind }