crdpuller

package
v0.27.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2025 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

crdpuller package provides a library to pull API resource definitions from existing Kubernetes clusters as Custom Resource Definitions that can then be applied to a KCP instance.

- If a CRD already exists for a given resource in the targeted cluster, then it is reused. - If no CRD exist in the targeted cluster, then the CRD OpenAPI v3 schema is built from the openAPI v2 (Swagger) definitions published by the targeted cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert added in v0.6.0

func Convert(protoSchema proto.Schema, schemaProps *apiextensionsv1.JSONSchemaProps) []error

func NewSchemaPuller

func NewSchemaPuller(
	discoveryClient discovery.DiscoveryInterface,
	crdClient apiextensionsv1client.ApiextensionsV1Interface,
) (*schemaPuller, error)

NewSchemaPuller allows creating a SchemaPuller from the `Config` of a given Kubernetes cluster, that will be able to pull API resources as CRDs from the given Kubernetes cluster.

Types

type SchemaConverter

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

func (*SchemaConverter) SubConverter

func (sc *SchemaConverter) SubConverter(schemaProps *apiextensionsv1.JSONSchemaProps, description string) *SchemaConverter

func (*SchemaConverter) VisitArbitrary

func (sc *SchemaConverter) VisitArbitrary(a *proto.Arbitrary)

func (*SchemaConverter) VisitArray

func (sc *SchemaConverter) VisitArray(a *proto.Array)

func (*SchemaConverter) VisitKind

func (sc *SchemaConverter) VisitKind(k *proto.Kind)

func (*SchemaConverter) VisitMap

func (sc *SchemaConverter) VisitMap(m *proto.Map)

func (*SchemaConverter) VisitPrimitive

func (sc *SchemaConverter) VisitPrimitive(p *proto.Primitive)

func (*SchemaConverter) VisitReference

func (sc *SchemaConverter) VisitReference(r proto.Reference)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL