resolver

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package resolver implements the Crossplane Package Lock controller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForName added in v1.18.0

func ForName(name string, fns ...FilterFn) handler.MapFunc

ForName enqueues a request for the named object. It only enqueues a request if all supplied filter functions return false.

func NewPackage added in v1.19.0

func NewPackage(dep *v1beta1.Dependency, version string, ref name.Reference) (*unstructured.Unstructured, error)

NewPackage creates a new package from the given dependency and version.

func NewPackageList added in v1.19.0

func NewPackageList(dep *v1beta1.Dependency) (*unstructured.UnstructuredList, error)

NewPackageList creates an empty package list suitable to get packages.

func Setup

func Setup(mgr ctrl.Manager, o controller.Options) error

Setup adds a controller that reconciles the Lock.

Types

type FilterFn added in v1.18.0

type FilterFn func(o client.Object) bool

A FilterFn returns true if the supplied object should be filtered.

func HasPullSecret added in v1.18.0

func HasPullSecret() FilterFn

HasPullSecret returns a FilterFn that filters any object that either isn't an ImageConfig, or is an ImageConfig that doesn't reference a pull secret.

type Reconciler

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

Reconciler reconciles packages.

func NewReconciler

func NewReconciler(mgr manager.Manager, opts ...ReconcilerOption) *Reconciler

NewReconciler creates a new lock dependency reconciler.

func (*Reconciler) Reconcile

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

Reconcile the lock by resolving dependencies.

type ReconcilerOption

type ReconcilerOption func(*Reconciler)

ReconcilerOption is used to configure the Reconciler.

func WithConfigStore added in v1.16.4

func WithConfigStore(c xpkg.ConfigStore) ReconcilerOption

WithConfigStore specifies how the Reconciler should access image config store.

func WithDefaultRegistry added in v1.15.0

func WithDefaultRegistry(registry string) ReconcilerOption

WithDefaultRegistry sets the default registry to use.

func WithDowngradesEnabled added in v1.19.0

func WithDowngradesEnabled() ReconcilerOption

WithDowngradesEnabled sets whether upgrades are enabled or not.

func WithFeatures added in v1.19.0

func WithFeatures(f *feature.Flags) ReconcilerOption

WithFeatures specifies which feature flags should be enabled.

func WithFetcher

func WithFetcher(f xpkg.Fetcher) ReconcilerOption

WithFetcher specifies how the Reconciler should fetch package tags.

func WithFinalizer

func WithFinalizer(f resource.Finalizer) ReconcilerOption

WithFinalizer specifies how the Reconciler should finalize package revisions.

func WithLogger

func WithLogger(log logging.Logger) ReconcilerOption

WithLogger specifies how the Reconciler should log messages.

func WithNewDagFn

func WithNewDagFn(f internaldag.NewDAGFn) ReconcilerOption

WithNewDagFn specifies how the Reconciler should build its dependency graph.

Jump to

Keyboard shortcuts

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