v1

package
v0.0.0-...-c510420 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	syncv1.Controller

	// Diff receives a list of k8s objects and should return a subset of the
	// same list to indicate the objects that are not in sync with the external
	// system.  If resync has been enabled, then each object in the list will be
	// re-applied with Ensure().
	Diff(context.Context, []client.Object) ([]client.Object, error)
}

Controller is a metadata sync controller interface that must be implemented by an external sync controller. It provides methods required for reconciling and syncing a k8s object's metadata to external objects.

type Reconciler

type Reconciler struct {
	syncv1.Reconciler
	Ctrlr Controller
	// contains filtered or unexported fields
}

Reconciler defines an external metadata sync reconciler based on the Sync reconciler with a sync function for resynchronization of the external objects.

func (*Reconciler) Init

func (s *Reconciler) Init(mgr ctrl.Manager, ctrlr Controller, prototype client.Object, prototypeList client.ObjectList, opts ...syncv1.ReconcilerOption) error

Init initializes the reconciler.

func (*Reconciler) SetResyncPeriod

func (s *Reconciler) SetResyncPeriod(period time.Duration)

SetResyncPeriod sets the resync interval.

func (*Reconciler) SetStartupSyncDelay

func (s *Reconciler) SetStartupSyncDelay(period time.Duration)

StartupSyncDelay sets a delay for the initial resync at startup. NOTE: Setting this too low can result in failure due to uninitialized controller components.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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