apiextensions

package
v0.0.0-...-c54dba7 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupCompositionSync

func SetupCompositionSync(mgr ctrl.Manager, localClient client.Client, log logging.Logger) error

SetupCompositionSync adds a controller that syncs Compositions from remote cluster to local cluster.

func SetupXRDSync

func SetupXRDSync(mgr ctrl.Manager, localClient client.Client, log logging.Logger) error

SetupXRDSync adds a controller that syncs CompositeResourceDefinitions from remote cluster to local cluster.

Types

type Reconciler

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

Reconciler syncs the Custom Resources of given CustomResourceDefinition from remote cluster to local cluster. It works only with cluster-scoped resources and always overrides the changes made to those Custom Resources in the local cluster.

func NewReconciler

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

NewReconciler returns a new *Reconciler object.

func (*Reconciler) Reconcile

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

Reconcile syncs the cluster-scoped instance of the type in remote->local direction.

type ReconcilerOption

type ReconcilerOption func(*Reconciler)

ReconcilerOption is used to configure the Reconciler.

func WithCRDName

func WithCRDName(name string) ReconcilerOption

WithCRDName specifies the name of the corresponding CRD object that has to be available in the local cluster.

func WithGetItemsFn

func WithGetItemsFn(f func(l runtime.Object) []runtimeresource.Object) ReconcilerOption

WithGetItemsFn specifies the function that will be used to retrieve an array of objects from the object list.

func WithLogger

func WithLogger(log logging.Logger) ReconcilerOption

WithLogger specifies how the Reconciler should log messages.

func WithNewInstanceFn

func WithNewInstanceFn(f func() runtimeresource.Object) ReconcilerOption

WithNewInstanceFn specifies the function to be used to initialize an empty object whose type is being reconciled by this Reconciler.

func WithNewObjectListFn

func WithNewObjectListFn(f func() runtime.Object) ReconcilerOption

WithNewObjectListFn specifies the function to be used to initialize an empty list of objects whose type is being reconciled by this Reconciler.

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