crdinstaller

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 22 Imported by: 4 modules, 4 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

Index

Constants

View Source
const (
	LabelHeritage string = "heritage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CRDsInstaller

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

CRDsInstaller simultaneously installs CRDs from specified directory

func NewCRDsInstaller

func NewCRDsInstaller(client dynamic.Interface, crdFilesPaths []string, options ...InstallerOption) *CRDsInstaller

NewCRDsInstaller creates new installer for CRDs

func (*CRDsInstaller) DeleteCRDs

func (cp *CRDsInstaller) DeleteCRDs(ctx context.Context, crdsToDelete []string) ([]string, error)

func (*CRDsInstaller) GetAppliedGVKs

func (cp *CRDsInstaller) GetAppliedGVKs() []string

func (*CRDsInstaller) GetCRDFromCluster

func (cp *CRDsInstaller) GetCRDFromCluster(ctx context.Context, crdName string) (*apiextensionsv1.CustomResourceDefinition, error)

func (*CRDsInstaller) Run

func (cp *CRDsInstaller) Run(ctx context.Context) error

type InstallerOption

type InstallerOption func(*CRDsInstaller)

func WithExtraLabels

func WithExtraLabels(labels map[string]string) InstallerOption

func WithFileFilter

func WithFileFilter(fn func(path string) bool) InstallerOption

func WithMutateFunc added in v0.12.6

func WithMutateFunc(fn MutateFunc) InstallerOption

WithMutateFunc sets a function that is applied to every CRD document before it goes to the cluster.

type MutateFunc added in v0.12.6

type MutateFunc func(crd *unstructured.Unstructured) error

MutateFunc changes a CRD document before it is applied. It is called for every non-empty document, so it must check the name itself; an error skips that document.

Directories

Path Synopsis
Package openapi holds the CRD validation schema type that the installer applies to the cluster.
Package openapi holds the CRD validation schema type that the installer applies to the cluster.

Jump to

Keyboard shortcuts

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