Issue 7529: fix gvr Group and Version field missing in KindFor method

Signed-off-by: zhouhao <zhouhao@cmss.chinamobile.com>
This commit is contained in:
zhouhao
2024-03-15 10:07:03 +08:00
parent b3a53ee8df
commit 7ce35ece4a
+2
View File
@@ -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
}