controllers

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStatusConditionErrored added in v0.3.0

func CreateStatusConditionErrored(err error) metav1.Condition

CreateStatusConditionErrored is a shortcut for adding a ConditionErrored condition with the given error message.

func CreateStatusConditionInvalid added in v0.3.0

func CreateStatusConditionInvalid(err error) metav1.Condition

CreateStatusConditionInvalid is a shortcut for adding a ConditionInvalid condition with the given error message.

func CreateStatusConditionReady added in v0.3.0

func CreateStatusConditionReady(isReady bool) metav1.Condition

CreateStatusConditionReady is a shortcut for adding a ConditionConfigReady condition.

Types

type NamespaceReconciler added in v0.4.0

type NamespaceReconciler struct {
	Client                  client.Client
	Log                     logr.Logger
	Scheme                  *runtime.Scheme
	WatchNamespace          string
	NewSyncConfigReconciler func() *SyncConfigReconciler
}

NamespaceReconciler reconciles SyncConfigs from namespace events

func (*NamespaceReconciler) Reconcile added in v0.4.0

func (r *NamespaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile processes the given namespace event request.

func (*NamespaceReconciler) SetupWithManager added in v0.4.0

func (r *NamespaceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager configures this reconciler with the given manager

type NamespaceReconciliationContext added in v0.4.0

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

NamespaceReconciliationContext holds parameters relevant for a single reconcile

type ReconciliationContext

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

ReconciliationContext holds the parameters of a single SyncConfig reconciliation

func (*ReconciliationContext) IncrementDeleteCount added in v0.3.0

func (rc *ReconciliationContext) IncrementDeleteCount()

IncrementDeleteCount increments the delete count by 1

func (*ReconciliationContext) IncrementFailCount added in v0.3.0

func (rc *ReconciliationContext) IncrementFailCount()

IncrementFailCount increments the fail count by 1

func (*ReconciliationContext) IncrementSyncCount added in v0.3.0

func (rc *ReconciliationContext) IncrementSyncCount()

IncrementSyncCount increments the sync count by 1

func (*ReconciliationContext) SetStatusCondition added in v0.3.0

func (rc *ReconciliationContext) SetStatusCondition(condition metav1.Condition)

SetStatusCondition adds the given condition to the status condition of the SyncConfig. Overwrites existing conditions of the same type.

func (*ReconciliationContext) SetStatusIfExisting added in v0.3.1

func (rc *ReconciliationContext) SetStatusIfExisting(conditionType syncv1alpha1.ConditionType, status metav1.ConditionStatus)

SetStatusIfExisting sets the condition of the given type to the given status, if the condition already exists, otherwise noop

type SyncConfigReconciler

type SyncConfigReconciler struct {
	Client            client.Client
	Log               logr.Logger
	Scheme            *runtime.Scheme
	ReconcileInterval time.Duration
	WatchNamespace    string
	// NamespaceScope limits creations and deletions of sync items to this namespace, provided the selector still matches.
	// If empty, the sync applies to all selector-matching namespaces.
	NamespaceScope string
}

SyncConfigReconciler reconciles SyncConfig objects

func (*SyncConfigReconciler) DoReconcile added in v0.4.0

func (r *SyncConfigReconciler) DoReconcile(ctx context.Context, syncConfig *syncv1alpha1.SyncConfig) (ctrl.Result, error)

DoReconcile is the actual reconciliation of the given SyncConfig

func (*SyncConfigReconciler) Reconcile

func (r *SyncConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile retrieves a SyncConfig from the given reconcile request

func (*SyncConfigReconciler) SetupWithManager

func (r *SyncConfigReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager configures this reconciler with the given manager

Jump to

Keyboard shortcuts

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