kube-aggregatork8s.io/kube-aggregator/pkg/controllers/openapiv3/aggregator Index | Files

package aggregator

import "k8s.io/kube-aggregator/pkg/controllers/openapiv3/aggregator"

Index

Variables

var ErrAPIServiceNotFound = errors.New("resource not found")

Functions

func IsLocalAPIService

func IsLocalAPIService(apiServiceName string) bool

IsLocalAPIService returns true for local specs from delegates.

Types

type Downloader

type Downloader struct {
}

Downloader is the OpenAPI downloader type. It will try to download spec from /openapi/v3 and /openap/v3/<group>/<version> endpoints.

func NewDownloader

func NewDownloader() Downloader

NewDownloader creates a new OpenAPI Downloader.

func (*Downloader) OpenAPIV3Root

func (s *Downloader) OpenAPIV3Root(handler http.Handler) (*handler3.OpenAPIV3Discovery, int, error)

OpenAPIV3Root downloads the OpenAPI V3 root document from an APIService

type NotFoundError

type NotFoundError struct {
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type SpecProxier

type SpecProxier interface {
	AddUpdateAPIService(handler http.Handler, apiService *v1.APIService)
	// UpdateAPIServiceSpec updates the APIService. It returns ErrAPIServiceNotFound if the APIService doesn't exist.
	UpdateAPIServiceSpec(apiServiceName string) error
	RemoveAPIServiceSpec(apiServiceName string)
	GetAPIServiceNames() []string
}

SpecProxier proxies OpenAPI V3 requests to their respective APIService

func BuildAndRegisterAggregator

func BuildAndRegisterAggregator(downloader Downloader, delegationTarget server.DelegationTarget, aggregatorService *restful.Container, openAPIConfig *common.OpenAPIV3Config, pathHandler common.PathHandlerByGroupVersion) (SpecProxier, error)

BuildAndRegisterAggregator registered OpenAPI aggregator handler. This function is not thread safe as it only being called on startup.

Source Files

aggregator.go downloader.go

Version
v0.32.2 (latest)
Published
Feb 13, 2025
Platform
linux/amd64
Imports
23 packages
Last checked
1 month ago

Tools for package owners.