mirror of https://github.com/kubernetes/kops.git
Dont fail resource dump if not all APIs can be discovered
This commit is contained in:
parent
7a43629a8e
commit
3b5fa6fc35
|
|
@ -111,7 +111,10 @@ func (d *resourceDumper) DumpResources(ctx context.Context) error {
|
|||
}
|
||||
|
||||
resourceLists, err := discoveryClient.ServerPreferredResources()
|
||||
if err != nil {
|
||||
var discoveryErr *discovery.ErrGroupDiscoveryFailed
|
||||
if errors.As(err, &discoveryErr) {
|
||||
klog.Warningf("using incomplete list of API groups: %v", discoveryErr)
|
||||
} else if err != nil {
|
||||
return fmt.Errorf("listing server preferred resources: %w", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue