crdschema

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 10 Imported by: ? 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

Package crdschema contains a controller that rebuilds the shared SSA TypeConverterProvider whenever a relevant CustomResourceDefinition changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	CRDGroups() map[string]struct{}
	IsCRDGroupRelevant(group string) bool
	Rebuild(ctx context.Context, logger logr.Logger, crds []*apiextensionsv1.CustomResourceDefinition) error
}

Provider is the subset of *ssa.TypeConverterProvider that Reconciler depends on. Narrowing to an interface keeps this package decoupled from the ssa package's internals and lets tests inject a fake.

type Reconciler

type Reconciler struct {
	client.Client

	LoggingMode logging.Mode
	Provider    Provider
}

Reconciler watches CustomResourceDefinitions and rebuilds the shared TypeConverterProvider whenever a relevant CRD changes.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is called whenever a relevant CRD is added, updated, or deleted. It lists only CRDs in the configured groups from the cache (via field index) and rebuilds the provider's TypeConverter in-process.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager) error

SetupWithManager registers the reconciler with the manager. The spec.group field index this relies on (see index.OptionsForCRDSchema) is registered centrally by modules/manager.SetupCacheIndexes.

Jump to

Keyboard shortcuts

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