From 98a0f4fe66aaefc193d2013dcb414a3ab098d356 Mon Sep 17 00:00:00 2001 From: zhouhao Date: Fri, 15 Mar 2024 09:58:12 +0800 Subject: [PATCH] Issue 7529: fix gvr `Group` and `Version` field missing in `KindFor` method --- pkg/discovery/helper.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/discovery/helper.go b/pkg/discovery/helper.go index fa84de1f96..e77a0dffd9 100644 --- a/pkg/discovery/helper.go +++ b/pkg/discovery/helper.go @@ -194,6 +194,8 @@ func (h *helper) Refresh() error { for _, resource := range resourceGroup.APIResources { gvr := gv.WithResource(resource.Name) gvk := gv.WithKind(resource.Kind) + resource.Group = gv.Group + resource.Version = gv.Version h.resourcesMap[gvr] = resource h.kindMap[gvk] = resource }