mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 14:23:37 +00:00
Fix 120739 - Prevent AddUpdateAPIService from blocking on updating spec
This commit is contained in:
parent
cdcf49ea12
commit
61603d36d7
@ -228,7 +228,7 @@ func (s *specAggregator) AddUpdateAPIService(apiService *v1.APIService, handler
|
|||||||
s.openAPIVersionedService.UpdateSpecLazy(s.buildMergeSpecLocked())
|
s.openAPIVersionedService.UpdateSpecLazy(s.buildMergeSpecLocked())
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.updateServiceLocked(apiService.Name)
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveAPIService removes an api service from OpenAPI aggregation. If it does not exist, no error is returned.
|
// RemoveAPIService removes an api service from OpenAPI aggregation. If it does not exist, no error is returned.
|
||||||
|
@ -139,7 +139,10 @@ func (c *AggregationController) AddAPIService(handler http.Handler, apiService *
|
|||||||
|
|
||||||
// UpdateAPIService updates API Service's info and handler.
|
// UpdateAPIService updates API Service's info and handler.
|
||||||
func (c *AggregationController) UpdateAPIService(handler http.Handler, apiService *v1.APIService) {
|
func (c *AggregationController) UpdateAPIService(handler http.Handler, apiService *v1.APIService) {
|
||||||
if err := c.openAPIAggregationManager.AddUpdateAPIService(apiService, handler); err != nil {
|
if apiService.Spec.Service == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err := c.openAPIAggregationManager.UpdateAPIServiceSpec(apiService.Name); err != nil {
|
||||||
utilruntime.HandleError(fmt.Errorf("Error updating APIService %q with err: %v", apiService.Name, err))
|
utilruntime.HandleError(fmt.Errorf("Error updating APIService %q with err: %v", apiService.Name, err))
|
||||||
}
|
}
|
||||||
key := apiService.Name
|
key := apiService.Name
|
||||||
|
Loading…
Reference in New Issue
Block a user