Merge pull request #7530 from zhouhaoA1/fix-kindfor

Fix gvr `Group` and `Version` field missing in `KindFor` method
pull/7409/merge
qiuming 2024-03-19 17:03:20 +08:00 committed by GitHub
commit 922653e97d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

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
}