Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #39457 #39664

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/controller/garbagecollector/garbagecollector.go
Expand Up @@ -563,6 +563,14 @@ func NewGarbageCollector(metaOnlyClientPool dynamic.ClientPool, clientPool dynam
}
kind, err := gc.restMapper.KindFor(resource)
if err != nil {
if _, ok := err.(*meta.NoResourceMatchError); ok {
// ignore NoResourceMatchErrors for now because TPRs won't be registered
// and hence the RestMapper does not know about them. The deletableResources
// though are using discovery which included TPRs.
// TODO: use dynamic discovery for RestMapper and deletableResources
glog.Warningf("ignore NoResourceMatchError for %v", resource)
continue
}
return nil, err
}
monitor, err := gc.monitorFor(resource, kind)
Expand Down
1 change: 1 addition & 0 deletions pkg/master/thirdparty/thirdparty.go
Expand Up @@ -281,6 +281,7 @@ func (m *ThirdPartyResourceServer) InstallThirdPartyResource(rsrc *extensions.Th
m.genericAPIServer.HandlerContainer.Add(apiserver.NewGroupWebService(api.Codecs, path, apiGroup))

m.addThirdPartyResourceStorage(path, plural.Resource, thirdparty.Storage[plural.Resource].(*thirdpartyresourcedataetcd.REST), apiGroup)
registered.AddThirdPartyAPIGroupVersions(unversioned.GroupVersion{Group: group, Version: rsrc.Versions[0].Name})
return nil
}

Expand Down