Merge pull request #134833 from rikatz/fix-panic-apiresources

Return error in case of discovery client failure
This commit is contained in:
Kubernetes Prow Robot 2025-10-25 01:37:33 -07:00 committed by GitHub
commit fb10a29954
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,