mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-11 01:41:54 -04:00
Merge pull request #134833 from rikatz/fix-panic-apiresources
Return error in case of discovery client failure
This commit is contained in:
commit
fb10a29954
1 changed files with 3 additions and 0 deletions
|
|
@ -229,6 +229,9 @@ func (o *APIResourceOptions) RunAPIResources() error {
|
|||
allResources = append(allResources, apiList)
|
||||
}
|
||||
|
||||
if len(allResources) == 0 {
|
||||
return utilerrors.NewAggregate(errs)
|
||||
}
|
||||
flatList := &metav1.APIResourceList{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: allResources[0].APIVersion,
|
||||
|
|
|
|||
Loading…
Reference in a new issue