rebase: update kubernetes to 1.28.0 in main

updating kubernetes to 1.28.0
in the main repo.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2023-08-17 07:15:28 +02:00
committed by mergify[bot]
parent b2fdc269c3
commit ff3e84ad67
706 changed files with 45252 additions and 16346 deletions

View File

@ -22,13 +22,12 @@ import (
"fmt"
"net/http"
"strconv"
"sync"
"time"
"github.com/NYTimes/gziphandler"
"github.com/emicklei/go-restful/v3"
"github.com/golang/protobuf/proto"
openapi_v2 "github.com/google/gnostic/openapiv2"
openapi_v2 "github.com/google/gnostic-models/openapiv2"
"github.com/google/uuid"
"github.com/munnerz/goautoneg"
klog "k8s.io/klog/v2"
@ -119,16 +118,14 @@ func ToProtoBinary(json []byte) ([]byte, error) {
// RegisterOpenAPIVersionedService registers a handler to provide access to provided swagger spec.
//
// Deprecated: use OpenAPIService.RegisterOpenAPIVersionedService instead.
func RegisterOpenAPIVersionedService(spec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error) {
func RegisterOpenAPIVersionedService(spec *spec.Swagger, servePath string, handler common.PathHandler) *OpenAPIService {
o := NewOpenAPIService(spec)
return o, o.RegisterOpenAPIVersionedService(servePath, handler)
o.RegisterOpenAPIVersionedService(servePath, handler)
return o
}
// RegisterOpenAPIVersionedService registers a handler to provide access to provided swagger spec.
func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handler common.PathHandler) error {
// Mutex protects the cache chain
var mutex sync.Mutex
func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handler common.PathHandler) {
accepted := []struct {
Type string
SubType string
@ -157,9 +154,7 @@ func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handl
continue
}
// serve the first matching media type in the sorted clause list
mutex.Lock()
result := accepts.GetDataAndEtag.Get()
mutex.Unlock()
if result.Err != nil {
klog.Errorf("Error in OpenAPI handler: %s", result.Err)
// only return a 503 if we have no older cache data to serve
@ -183,8 +178,6 @@ func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handl
return
}),
))
return nil
}
// BuildAndRegisterOpenAPIVersionedService builds the spec and registers a handler to provide access to it.
@ -203,5 +196,6 @@ func BuildAndRegisterOpenAPIVersionedServiceFromRoutes(servePath string, routeCo
return nil, err
}
o := NewOpenAPIService(spec)
return o, o.RegisterOpenAPIVersionedService(servePath, handler)
o.RegisterOpenAPIVersionedService(servePath, handler)
return o, nil
}