apiextensions-apiserverk8s.io/apiextensions-apiserver/pkg/controller/openapi Index | Files

package openapi

import "k8s.io/apiextensions-apiserver/pkg/controller/openapi"

Index

Functions

func BuildSwagger

func BuildSwagger(crd *apiextensions.CustomResourceDefinition, version string) (*spec.Swagger, error)

BuildSwagger builds swagger for the given crd in the given version

func ToStructuralOpenAPIV2

func ToStructuralOpenAPIV2(in *structuralschema.Structural) *structuralschema.Structural

ToStructuralOpenAPIV2 converts our internal OpenAPI v3 structural schema to to a v2 compatible schema.

Types

type CRDCanonicalTypeNamer

type CRDCanonicalTypeNamer struct {
	// contains filtered or unexported fields
}

CRDCanonicalTypeNamer implements CanonicalTypeNamer interface for CRDs to seed kube-openapi canonical type name without Go types

func (*CRDCanonicalTypeNamer) OpenAPICanonicalTypeName

func (c *CRDCanonicalTypeNamer) OpenAPICanonicalTypeName() string

OpenAPICanonicalTypeName returns canonical type name for given CRD

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller watches CustomResourceDefinitions and publishes validation schema

func NewController

func NewController(crdInformer informers.CustomResourceDefinitionInformer) *Controller

NewController creates a new Controller with input CustomResourceDefinition informer

func (*Controller) Run

func (c *Controller) Run(staticSpec *spec.Swagger, openAPIService *handler.OpenAPIService, stopCh <-chan struct{})

Run sets openAPIAggregationManager and starts workers

Source Files

aggregator.go builder.go controller.go conversion.go

Version
v0.15.10
Published
Feb 11, 2020
Platform
js/wasm
Imports
34 packages
Last checked
1 hour ago

Tools for package owners.