fix openapi/v3 non local apiservices aggregation

When resyncing APIServices (every minute), the AggregationController calls
AddUpdateAPIService immediately, but it may take some time before the
reconciliation of the controller calls UpdateAPIServiceSpec. This results in a
temporary downtime of discovery of these APIServices, which will stop reporting
of these in the aggregated openapi/v3 by specProxier. This fix ensures that old
discovery is kept during a time, when the AggregationController is reconciling.
This commit is contained in:
Filip Křepinský 2023-06-26 18:41:10 +02:00
parent ba6d2674ca
commit 3df92362ab

View File

@ -114,6 +114,7 @@ func (s *specProxier) AddUpdateAPIService(handler http.Handler, apiservice *v1.A
if apiServiceInfo, ok := s.apiServiceInfo[apiservice.Name]; ok {
apiServiceInfo.apiService = *apiservice
apiServiceInfo.handler = handler
return
}
s.apiServiceInfo[apiservice.Name] = &openAPIV3APIServiceInfo{
apiService: *apiservice,