Documentation
¶
Index ¶
- func SetupCompositionSync(mgr ctrl.Manager, localClient client.Client, log logging.Logger) error
- func SetupXRDSync(mgr ctrl.Manager, localClient client.Client, log logging.Logger) error
- type Reconciler
- type ReconcilerOption
- func WithCRDName(name string) ReconcilerOption
- func WithGetItemsFn(f func(l runtime.Object) []runtimeresource.Object) ReconcilerOption
- func WithLogger(log logging.Logger) ReconcilerOption
- func WithNewInstanceFn(f func() runtimeresource.Object) ReconcilerOption
- func WithNewObjectListFn(f func() runtime.Object) ReconcilerOption
- func WithRecorder(er event.Recorder) ReconcilerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupCompositionSync ¶
SetupCompositionSync adds a controller that syncs Compositions 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.
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.