offered

package
v1.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OffersClaim

func OffersClaim() resource.PredicateFn

OffersClaim accepts objects that are a CompositeResourceDefinition and offer a composite resource claim.

func Setup

func Setup(mgr ctrl.Manager, log logging.Logger) error

Setup adds a controller that reconciles CompositeResourceDefinitions by defining a composite resource claim and starting a controller to reconcile it.

Types

type CRDRenderFn

A CRDRenderFn renders an CompositeResourceDefinition's corresponding CustomResourceDefinition.

func (CRDRenderFn) Render

Render the supplied CompositeResourceDefinition's corresponding CustomResourceDefinition.

type CRDRenderer

type CRDRenderer interface {
	Render(d *v1.CompositeResourceDefinition) (*extv1.CustomResourceDefinition, error)
}

A CRDRenderer renders an CompositeResourceDefinition's corresponding CustomResourceDefinition.

type ControllerEngine

type ControllerEngine interface {
	IsRunning(name string) bool
	Start(name string, o kcontroller.Options, w ...controller.Watch) error
	Stop(name string)
	Err(name string) error
}

A ControllerEngine can start and stop Kubernetes controllers on demand.

type EnqueueRequestForClaim

type EnqueueRequestForClaim struct{}

EnqueueRequestForClaim enqueues a reconcile.Request for the NamespacedName of a ClaimReferencer's ClaimReference.

func (*EnqueueRequestForClaim) Create

Create adds a NamespacedName for the supplied CreateEvent if its Object is a ClaimReferencer.

func (*EnqueueRequestForClaim) Delete

Delete adds a NamespacedName for the supplied DeleteEvent if its Object is a ClaimReferencer.

func (*EnqueueRequestForClaim) Generic

Generic adds a NamespacedName for the supplied GenericEvent if its Object is a ClaimReferencer.

func (*EnqueueRequestForClaim) Update

Update adds a NamespacedName for the supplied UpdateEvent if its Objects are ClaimReferencers.

type Reconciler

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

A Reconciler reconciles CompositeResourceDefinitions.

func NewReconciler

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

NewReconciler returns a Reconciler of CompositeResourceDefinitions.

func (*Reconciler) Reconcile

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

Reconcile a CompositeResourceDefinition by defining a new kind of composite resource claim and starting a controller to reconcile it.

type ReconcilerOption

type ReconcilerOption func(*Reconciler)

ReconcilerOption is used to configure the Reconciler.

func WithCRDRenderer

func WithCRDRenderer(c CRDRenderer) ReconcilerOption

WithCRDRenderer specifies how the Reconciler should render a CompositeResourceDefinition's corresponding CustomResourceDefinition.

func WithClientApplicator

func WithClientApplicator(ca resource.ClientApplicator) ReconcilerOption

WithClientApplicator specifies how the Reconciler should interact with the Kubernetes API.

func WithControllerEngine

func WithControllerEngine(c ControllerEngine) ReconcilerOption

WithControllerEngine specifies how the Reconciler should manage the lifecycles of claim controllers.

func WithFinalizer

func WithFinalizer(f resource.Finalizer) ReconcilerOption

WithFinalizer specifies how the Reconciler should finalize CompositeResourceDefinitions.

func WithLogger

func WithLogger(log logging.Logger) ReconcilerOption

WithLogger specifies how the Reconciler should log messages.

func WithRecorder

func WithRecorder(er event.Recorder) ReconcilerOption

WithRecorder specifies how the Reconciler should record Kubernetes events.

Jump to

Keyboard shortcuts

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