Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

WIP: Differential test of webhook #4483

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion addons/webhooks/clusterbootstrap_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ func (wh *ClusterBootstrap) getGVR(gk schema.GroupKind) (*schema.GroupVersionRes
return gvr, nil
}
apiResourceList, err := wh.cachedDiscoveryClient.ServerPreferredResources()
if err != nil {
// ServerPreferredResources will return a list for apiResourceList, even if err != nil.
// For example, in the case of err = discovery.ErrGroupDiscoveryFailed for just one of the apiResources
if _, ok := err.(*discovery.ErrGroupDiscoveryFailed); err != nil && !ok {
return nil, err
}
for _, apiResource := range apiResourceList {
Expand Down