mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 12:17:52 +00:00
Propagate error from NewREST
This commit is contained in:
@@ -34,7 +34,7 @@ type RESTStorageProvider struct {
|
||||
APIAudiences authenticator.Audiences
|
||||
}
|
||||
|
||||
func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool) {
|
||||
func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool, error) {
|
||||
// TODO figure out how to make the swagger generation stable, while allowing this endpoint to be disabled.
|
||||
// if p.Authenticator == nil {
|
||||
// return genericapiserver.APIGroupInfo{}, false
|
||||
@@ -51,7 +51,7 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
|
||||
apiGroupInfo.VersionedResourcesStorageMap[authenticationv1.SchemeGroupVersion.Version] = p.v1Storage(apiResourceConfigSource, restOptionsGetter)
|
||||
}
|
||||
|
||||
return apiGroupInfo, true
|
||||
return apiGroupInfo, true, nil
|
||||
}
|
||||
|
||||
func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
|
||||
|
Reference in New Issue
Block a user