Documentation ¶
Index ¶
- func CreateStatusConditionErrored(err error) metav1.Condition
- func CreateStatusConditionInvalid(err error) metav1.Condition
- func CreateStatusConditionReady(isReady bool) metav1.Condition
- type NamespaceReconciler
- type NamespaceReconciliationContext
- type ReconciliationContext
- func (rc *ReconciliationContext) IncrementDeleteCount()
- func (rc *ReconciliationContext) IncrementFailCount()
- func (rc *ReconciliationContext) IncrementSyncCount()
- func (rc *ReconciliationContext) SetStatusCondition(condition metav1.Condition)
- func (rc *ReconciliationContext) SetStatusIfExisting(conditionType syncv1alpha1.ConditionType, status metav1.ConditionStatus)
- type SyncConfigReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateStatusConditionErrored ¶ added in v0.3.0
CreateStatusConditionErrored is a shortcut for adding a ConditionErrored condition with the given error message.
func CreateStatusConditionInvalid ¶ added in v0.3.0
CreateStatusConditionInvalid is a shortcut for adding a ConditionInvalid condition with the given error message.
func CreateStatusConditionReady ¶ added in v0.3.0
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
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