multiphase

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicMultiPhaseReconcilerAction

type BasicMultiPhaseReconcilerAction[k8sObject object.MultiPhaseObject] struct {
	controller.ReconcilerAction
}

BasicMultiPhaseReconcilerAction is the default implementation of MultiPhaseReconcilerAction interface

func (*BasicMultiPhaseReconcilerAction[k8sObject]) Configure

func (h *BasicMultiPhaseReconcilerAction[k8sObject]) Configure(ctx context.Context, req reconcile.Request, o k8sObject, data map[string]any, logger *logrus.Entry) (res reconcile.Result, err error)

func (*BasicMultiPhaseReconcilerAction[k8sObject]) Delete

func (h *BasicMultiPhaseReconcilerAction[k8sObject]) Delete(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (err error)

func (*BasicMultiPhaseReconcilerAction[k8sObject]) OnError

func (h *BasicMultiPhaseReconcilerAction[k8sObject]) OnError(ctx context.Context, o k8sObject, data map[string]any, currentErr error, logger *logrus.Entry) (res reconcile.Result, err error)

func (*BasicMultiPhaseReconcilerAction[k8sObject]) OnSuccess

func (h *BasicMultiPhaseReconcilerAction[k8sObject]) OnSuccess(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (res reconcile.Result, err error)

func (*BasicMultiPhaseReconcilerAction[k8sObject]) Read

func (h *BasicMultiPhaseReconcilerAction[k8sObject]) Read(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (res reconcile.Result, err error)

type DefaultMultiPhaseDiff

type DefaultMultiPhaseDiff[k8sStepObject client.Object] struct {
	// contains filtered or unexported fields
}

DefaultMultiPhaseDiff is the default implementation of MultiPhaseDiff interface

func (*DefaultMultiPhaseDiff[k8sStepObject]) AddDiff

func (h *DefaultMultiPhaseDiff[k8sStepObject]) AddDiff(diff string)

func (*DefaultMultiPhaseDiff[k8sStepObject]) AddObjectToCreate

func (h *DefaultMultiPhaseDiff[k8sStepObject]) AddObjectToCreate(o k8sStepObject)

func (*DefaultMultiPhaseDiff[k8sStepObject]) AddObjectToDelete

func (h *DefaultMultiPhaseDiff[k8sStepObject]) AddObjectToDelete(o k8sStepObject)

func (*DefaultMultiPhaseDiff[k8sStepObject]) AddObjectToUpdate

func (h *DefaultMultiPhaseDiff[k8sStepObject]) AddObjectToUpdate(o k8sStepObject)

func (*DefaultMultiPhaseDiff[k8sStepObject]) Diff

func (h *DefaultMultiPhaseDiff[k8sStepObject]) Diff() string

func (*DefaultMultiPhaseDiff[k8sStepObject]) GetObjectsToCreate

func (h *DefaultMultiPhaseDiff[k8sStepObject]) GetObjectsToCreate() []k8sStepObject

func (*DefaultMultiPhaseDiff[k8sStepObject]) GetObjectsToDelete

func (h *DefaultMultiPhaseDiff[k8sStepObject]) GetObjectsToDelete() []k8sStepObject

func (*DefaultMultiPhaseDiff[k8sStepObject]) GetObjectsToUpdate

func (h *DefaultMultiPhaseDiff[k8sStepObject]) GetObjectsToUpdate() []k8sStepObject

func (*DefaultMultiPhaseDiff[k8sStepObject]) IsDiff

func (h *DefaultMultiPhaseDiff[k8sStepObject]) IsDiff() bool

func (*DefaultMultiPhaseDiff[k8sStepObject]) NeedCreate

func (h *DefaultMultiPhaseDiff[k8sStepObject]) NeedCreate() bool

func (*DefaultMultiPhaseDiff[k8sStepObject]) NeedDelete

func (h *DefaultMultiPhaseDiff[k8sStepObject]) NeedDelete() bool

func (*DefaultMultiPhaseDiff[k8sStepObject]) NeedUpdate

func (h *DefaultMultiPhaseDiff[k8sStepObject]) NeedUpdate() bool

func (*DefaultMultiPhaseDiff[k8sStepObject]) SetObjectsToCreate

func (h *DefaultMultiPhaseDiff[k8sStepObject]) SetObjectsToCreate(objects []k8sStepObject)

func (*DefaultMultiPhaseDiff[k8sStepObject]) SetObjectsToDelete

func (h *DefaultMultiPhaseDiff[k8sStepObject]) SetObjectsToDelete(objects []k8sStepObject)

func (*DefaultMultiPhaseDiff[k8sStepObject]) SetObjectsToUpdate

func (h *DefaultMultiPhaseDiff[k8sStepObject]) SetObjectsToUpdate(objects []k8sStepObject)

type DefaultMultiPhaseRead

type DefaultMultiPhaseRead[k8sStepObject client.Object] struct {
	// contains filtered or unexported fields
}

DefaultMultiPhaseRead is the default implementation if MultiPhaseRead

func (*DefaultMultiPhaseRead[k8sStepObject]) AddCurrentObject

func (h *DefaultMultiPhaseRead[k8sStepObject]) AddCurrentObject(o k8sStepObject)

func (*DefaultMultiPhaseRead[k8sStepObject]) AddExpectedObject

func (h *DefaultMultiPhaseRead[k8sStepObject]) AddExpectedObject(o k8sStepObject)

func (*DefaultMultiPhaseRead[k8sStepObject]) GetCurrentObjects

func (h *DefaultMultiPhaseRead[k8sStepObject]) GetCurrentObjects() []k8sStepObject

func (*DefaultMultiPhaseRead[k8sStepObject]) GetExpectedObjects

func (h *DefaultMultiPhaseRead[k8sStepObject]) GetExpectedObjects() []k8sStepObject

func (*DefaultMultiPhaseRead[k8sStepObject]) SetCurrentObjects

func (h *DefaultMultiPhaseRead[k8sStepObject]) SetCurrentObjects(objects []k8sStepObject)

func (*DefaultMultiPhaseRead[k8sStepObject]) SetExpectedObjects

func (h *DefaultMultiPhaseRead[k8sStepObject]) SetExpectedObjects(objects []k8sStepObject)

type DefaultMultiPhaseReconciler

type DefaultMultiPhaseReconciler[k8sObject object.MultiPhaseObject] struct {
	controller.Reconciler
	// contains filtered or unexported fields
}

DefaultMultiPhaseReconciler is the default multi phase reconsiler you can used when you should to create multiple k8s resources

func (*DefaultMultiPhaseReconciler[k8sObject]) Reconcile

func (h *DefaultMultiPhaseReconciler[k8sObject]) Reconcile(ctx context.Context, req reconcile.Request, o k8sObject, data map[string]interface{}, reconcilerAction MultiPhaseReconcilerAction[k8sObject], reconcilersStepAction ...MultiPhaseStepReconcilerAction[k8sObject, client.Object]) (res reconcile.Result, err error)

type DefaultMultiPhaseStepReconciler

type DefaultMultiPhaseStepReconciler[k8sObject object.MultiPhaseObject, k8sStepObject client.Object] struct {
	controller.BaseReconciler
}

DefaultMultiPhaseStepReconciler is the default implementation of MultiPhaseStepReconciler interface

func (*DefaultMultiPhaseStepReconciler[k8sObject, k8sStepObject]) Reconcile

func (h *DefaultMultiPhaseStepReconciler[k8sObject, k8sStepObject]) Reconcile(ctx context.Context, req reconcile.Request, o k8sObject, data map[string]interface{}, reconcilerAction MultiPhaseStepReconcilerAction[k8sObject, k8sStepObject], logger *logrus.Entry, ignoresDiff ...patch.CalculateOption) (res reconcile.Result, err error)

Reconcile permit to reconcile the step (one K8s resource)

type DefaultMultiPhaseStepReconcilerAction

type DefaultMultiPhaseStepReconcilerAction[k8sObject object.MultiPhaseObject, k8sStepObject client.Object] struct {
	controller.ReconcilerAction
	// contains filtered or unexported fields
}

DefaultMultiPhaseStepReconcilerAction is the default implementation of MultiPhaseStepReconcilerAction

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Configure

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Configure(ctx context.Context, req reconcile.Request, o k8sObject, logger *logrus.Entry) (res reconcile.Result, err error)

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Create

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Create(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObject, logger *logrus.Entry) (res reconcile.Result, err error)

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Delete

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Delete(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObject, logger *logrus.Entry) (res reconcile.Result, err error)

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Diff

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Diff(ctx context.Context, o k8sObject, read MultiPhaseRead[k8sStepObject], data map[string]any, logger *logrus.Entry, ignoreDiff ...patch.CalculateOption) (diff MultiPhaseDiff[k8sStepObject], res reconcile.Result, err error)

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) GetIgnoresDiff

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) GetIgnoresDiff() []patch.CalculateOption

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) GetPhaseName

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) GetPhaseName() shared.PhaseName

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) OnError

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) OnError(ctx context.Context, o k8sObject, data map[string]any, currentErr error, logger *logrus.Entry) (res reconcile.Result, err error)

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) OnSuccess

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) OnSuccess(ctx context.Context, o k8sObject, data map[string]any, diff MultiPhaseDiff[k8sStepObject], logger *logrus.Entry) (res reconcile.Result, err error)

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Read

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Read(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (read MultiPhaseRead[k8sStepObject], res reconcile.Result, err error)

func (*DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Update

func (h *DefaultMultiPhaseStepReconcilerAction[k8sObject, k8sStepObject]) Update(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObject, logger *logrus.Entry) (res reconcile.Result, err error)

type MultiPhaseDiff

type MultiPhaseDiff[k8sStepObject client.Object] interface {
	// NeedCreate is true when need to create K8s object
	NeedCreate() bool

	// NeedUpdate is true when need to update K8s object
	NeedUpdate() bool

	// NeedDelete is true when need to delete K8s object
	NeedDelete() bool

	// GetObjectsToCreate is the list of object to create on K8s
	GetObjectsToCreate() []k8sStepObject

	// SetObjectsToCreate permit to set the list of object to create on K8s
	SetObjectsToCreate(objects []k8sStepObject)

	// AddObjectToCreate permit to add object on create list
	AddObjectToCreate(o k8sStepObject)

	// GetObjectsToUpdate is the list of object to update on K8s
	GetObjectsToUpdate() []k8sStepObject

	// SetObjectsToUpdate permit to set the list of object to update on K8s
	SetObjectsToUpdate(objects []k8sStepObject)

	// AddObjectToUpdate permit to add object on update list
	AddObjectToUpdate(o k8sStepObject)

	// GetObjectsToDelete is the list of Object to delete on K8s
	GetObjectsToDelete() []k8sStepObject

	// SetObjectsToDelete permit to set the list of object to delete
	SetObjectsToDelete(objects []k8sStepObject)

	// AddObjectToDelete permit to add object on delete list
	AddObjectToDelete(o k8sStepObject)

	// AddDiff permit to add diff
	// It add return line at the end
	AddDiff(diff string)

	// Diff permit to print human diff
	Diff() string

	// IsDiff permit to know is there are current diff to print
	IsDiff() bool
}

MultiPhaseDiff is used to know if currents resources differ with expected

func NewMultiPhaseDiff

func NewMultiPhaseDiff[k8sStepObject client.Object]() MultiPhaseDiff[k8sStepObject]

NewMultiPhaseDiff is the default implementation of MultiPhaseDiff interface

func NewObjectMultiphaseDiff

func NewObjectMultiphaseDiff[k8sStepObjectSrc client.Object, k8sStepObjectDst client.Object](in MultiPhaseDiff[k8sStepObjectSrc]) MultiPhaseDiff[k8sStepObjectDst]

type MultiPhaseRead

type MultiPhaseRead[k8sStepObject client.Object] interface {
	// GetCurrentObjects permit to get the list of current objects
	GetCurrentObjects() []k8sStepObject

	// SetCurrentObjects permit to set the list of current objects
	SetCurrentObjects(objects []k8sStepObject)

	// AddCurrentObject will add object on the list of current objects
	AddCurrentObject(o k8sStepObject)

	// GetExpectedObjects permit to get the list of expected objects
	GetExpectedObjects() []k8sStepObject

	// SetExpectedObjects permit to set the list of expected objects
	SetExpectedObjects(objects []k8sStepObject)

	// AddExpectedObject will add object on the list of expected objects
	AddExpectedObject(o k8sStepObject)
}

MultiPhaseRead is the interface to store the result of read step on multi phase reconciler

func NewMultiPhaseRead

func NewMultiPhaseRead[k8sStepObject client.Object]() MultiPhaseRead[k8sStepObject]

NewMultiPhaseRead is the default implementation of MultiPhaseRead interface

func NewObjectMultiphaseRead

func NewObjectMultiphaseRead[k8sStepObjectSrc client.Object, k8sStepObjectDst client.Object](in MultiPhaseRead[k8sStepObjectSrc]) MultiPhaseRead[k8sStepObjectDst]

type MultiPhaseReconciler

type MultiPhaseReconciler[k8sObject object.MultiPhaseObject] interface {
	controller.Reconciler

	// Reconcile permit to orchestrate all phase needed to successfully reconcile the object
	Reconcile(ctx context.Context, req reconcile.Request, o k8sObject, data map[string]interface{}, reconcilerAction MultiPhaseReconcilerAction[k8sObject], reconcilersStepAction ...MultiPhaseStepReconcilerAction[k8sObject, client.Object]) (res reconcile.Result, err error)
}

MultiPhaseReconciler the reconciler to implement whe you need to create multiple resources on k8s

func NewMultiPhaseReconciler

func NewMultiPhaseReconciler[k8sObject object.MultiPhaseObject](c client.Client, name string, finalizer shared.FinalizerName, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler MultiPhaseReconciler[k8sObject])

NewMultiPhaseReconciler is the default implementation of MultiPhaseReconciler

type MultiPhaseReconcilerAction

type MultiPhaseReconcilerAction[k8sObject object.MultiPhaseObject] interface {
	controller.ReconcilerAction

	// Configure permit to init condition on status
	Configure(ctx context.Context, req reconcile.Request, o k8sObject, data map[string]any, logger *logrus.Entry) (res reconcile.Result, err error)

	// Read permit to read kubernetes resources
	Read(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (res reconcile.Result, err error)

	// Delete permit to delete resources on kubernetes
	Delete(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (err error)

	// OnError is call when error is throwing on current phase
	// It the right way to set status condition when error
	OnError(ctx context.Context, o k8sObject, data map[string]any, currentErr error, logger *logrus.Entry) (res reconcile.Result, err error)

	// OnSuccess is call at the end of current phase, if not error
	// It's the right way to set status condition when everithink is good
	OnSuccess(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (res reconcile.Result, err error)
}

MultiPhaseReconcilerAction is the methode needed by step reconciler to reconcile your custom resource

func NewMultiPhaseReconcilerAction

func NewMultiPhaseReconcilerAction[k8sObject object.MultiPhaseObject](client client.Client, conditionName shared.ConditionName, recorder record.EventRecorder) (multiPhaseReconciler MultiPhaseReconcilerAction[k8sObject])

NewMultiPhaseReconcilerAction is the default implementation of MultiPhaseReconcilerAction interface

type MultiPhaseStepReconciler

type MultiPhaseStepReconciler[k8sObject object.MultiPhaseObject, k8sStepObject client.Object] interface {
	controller.BaseReconciler

	// Reconcile permit to reconcile the step (one K8s resource)
	Reconcile(ctx context.Context, req reconcile.Request, o k8sObject, data map[string]interface{}, reconciler MultiPhaseStepReconcilerAction[k8sObject, k8sStepObject], logger *logrus.Entry, ignoresDiff ...patch.CalculateOption) (res reconcile.Result, err error)
}

MultiPhaseStepReconciler is the reconciler to implement to create one step for MultiPhaseReconciler

func NewMultiPhaseStepReconciler

func NewMultiPhaseStepReconciler[k8sObject object.MultiPhaseObject, k8sStepObject client.Object](client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseStepReconciler MultiPhaseStepReconciler[k8sObject, k8sStepObject])

NewMultiPhaseStepReconciler is the default implementation of MultiPhaseStepReconciler interface

type MultiPhaseStepReconcilerAction

type MultiPhaseStepReconcilerAction[k8sObject object.MultiPhaseObject, k8sStepObject client.Object] interface {
	controller.ReconcilerAction

	// Configure permit to init condition on status
	Configure(ctx context.Context, req reconcile.Request, o k8sObject, logger *logrus.Entry) (res reconcile.Result, err error)

	// Read permit to read kubernetes resources
	Read(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (read MultiPhaseRead[k8sStepObject], res reconcile.Result, err error)

	// Create permit to create resources on kubernetes
	Create(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObject, logger *logrus.Entry) (res reconcile.Result, err error)

	// Update permit to update resources on kubernetes
	Update(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObject, logger *logrus.Entry) (res reconcile.Result, err error)

	// Delete permit to delete resources on kubernetes
	Delete(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObject, logger *logrus.Entry) (res reconcile.Result, err error)

	// OnError is call when error is throwing on current phase
	// It the right way to set status condition when error
	OnError(ctx context.Context, o k8sObject, data map[string]any, currentErr error, logger *logrus.Entry) (res reconcile.Result, err error)

	// OnSuccess is call at the end of current phase, if not error
	// It's the right way to set status condition when everithink is good
	OnSuccess(ctx context.Context, o k8sObject, data map[string]any, diff MultiPhaseDiff[k8sStepObject], logger *logrus.Entry) (res reconcile.Result, err error)

	// Diff permit to compare the actual state and the expected state
	Diff(ctx context.Context, o k8sObject, read MultiPhaseRead[k8sStepObject], data map[string]any, logger *logrus.Entry, ignoreDiff ...patch.CalculateOption) (diff MultiPhaseDiff[k8sStepObject], res reconcile.Result, err error)

	// GetPhaseName permit to get the phase name
	GetPhaseName() shared.PhaseName

	GetIgnoresDiff() []patch.CalculateOption
}

MultiPhaseStepReconcilerAction is the interface that use by reconciler step to reconcile your intermediate K8s resources

func NewMultiPhaseStepReconcilerAction

func NewMultiPhaseStepReconcilerAction[k8sObject object.MultiPhaseObject, k8sStepObject client.Object](client client.Client, phaseName shared.PhaseName, conditionName shared.ConditionName, recorder record.EventRecorder) (multiPhaseStepReconciler MultiPhaseStepReconcilerAction[k8sObject, k8sStepObject])

NewMultiPhaseStepReconcilerAction is the default implementation of MultiPhaseStepReconcilerAction interface

func NewObjectMultiPhaseStepReconcilerAction

func NewObjectMultiPhaseStepReconcilerAction[k8sObject object.MultiPhaseObject, k8sStepObjectSrc client.Object, k8sStepObjectDst client.Object](in MultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc]) MultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectDst]

type ObjectMultiPhaseDiff

type ObjectMultiPhaseDiff[k8sStepObjectSrc client.Object, k8sStepObjectDst client.Object] struct {
	// contains filtered or unexported fields
}

ObjectMultiPhaseDiff is the implementation of MultiPhaseDiff for a specific client.Object type needed by multiphase reconciler It's kind of wrapper to conver MultiPhaseDiff[k8sStepObject] to MultiPhaseDiff[client.Object]

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) AddDiff

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) AddDiff(diff string)

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) AddObjectToCreate

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) AddObjectToCreate(o k8sStepObjectDst)

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) AddObjectToDelete

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) AddObjectToDelete(o k8sStepObjectDst)

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) AddObjectToUpdate

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) AddObjectToUpdate(o k8sStepObjectDst)

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) Diff

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) Diff() string

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) GetObjectsToCreate

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) GetObjectsToCreate() []k8sStepObjectDst

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) GetObjectsToDelete

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) GetObjectsToDelete() []k8sStepObjectDst

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) GetObjectsToUpdate

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) GetObjectsToUpdate() []k8sStepObjectDst

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) IsDiff

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) IsDiff() bool

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) NeedCreate

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) NeedCreate() bool

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) NeedDelete

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) NeedDelete() bool

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) NeedUpdate

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) NeedUpdate() bool

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) SetObjectsToCreate

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) SetObjectsToCreate(objects []k8sStepObjectDst)

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) SetObjectsToDelete

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) SetObjectsToDelete(objects []k8sStepObjectDst)

func (*ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) SetObjectsToUpdate

func (h *ObjectMultiPhaseDiff[k8sStepObjectSrc, k8sStepObjectDst]) SetObjectsToUpdate(objects []k8sStepObjectDst)

type ObjectMultiPhaseRead

type ObjectMultiPhaseRead[k8sStepObjectSrc client.Object, k8sStepObjectDst client.Object] struct {
	// contains filtered or unexported fields
}

ObjectMultiPhaseRead is the implementation of MultiPhaseRead for a specific client.Object type needed by multiphase reconciler It's kind of wrapper to conver MultiPhaseRead[k8sStepObject] to MultiPhaseRead[client.Object]

func (*ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) AddCurrentObject

func (h *ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) AddCurrentObject(o k8sStepObjectDst)

func (*ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) AddExpectedObject

func (h *ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) AddExpectedObject(o k8sStepObjectDst)

func (*ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) GetCurrentObjects

func (h *ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) GetCurrentObjects() []k8sStepObjectDst

func (*ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) GetExpectedObjects

func (h *ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) GetExpectedObjects() []k8sStepObjectDst

func (*ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) SetCurrentObjects

func (h *ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) SetCurrentObjects(objects []k8sStepObjectDst)

func (*ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) SetExpectedObjects

func (h *ObjectMultiPhaseRead[k8sStepObjectSrc, k8sStepObjectDst]) SetExpectedObjects(objects []k8sStepObjectDst)

type ObjectMultiPhaseStepReconcilerAction

type ObjectMultiPhaseStepReconcilerAction[k8sObject object.MultiPhaseObject, k8sStepObjectSrc client.Object, k8sStepObjectDst client.Object] struct {
	controller.ReconcilerAction
	// contains filtered or unexported fields
}

ObjectMultiPhaseRead is the implementation of MultiPhaseRead for a specific client.Object type needed by multiphase reconciler It's kind of wrapper to conver MultiPhaseRead[k8sStepObject] to MultiPhaseRead[client.Object]

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Configure

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Configure(ctx context.Context, req reconcile.Request, o k8sObject, logger *logrus.Entry) (res reconcile.Result, err error)

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Create

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Create(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObjectDst, logger *logrus.Entry) (res reconcile.Result, err error)

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Delete

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Delete(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObjectDst, logger *logrus.Entry) (res reconcile.Result, err error)

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Diff

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Diff(ctx context.Context, o k8sObject, read MultiPhaseRead[k8sStepObjectDst], data map[string]any, logger *logrus.Entry, ignoreDiff ...patch.CalculateOption) (diff MultiPhaseDiff[k8sStepObjectDst], res reconcile.Result, err error)

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) GetIgnoresDiff

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) GetIgnoresDiff() []patch.CalculateOption

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) GetPhaseName

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) GetPhaseName() shared.PhaseName

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) OnError

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) OnError(ctx context.Context, o k8sObject, data map[string]any, currentErr error, logger *logrus.Entry) (res reconcile.Result, err error)

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) OnSuccess

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) OnSuccess(ctx context.Context, o k8sObject, data map[string]any, diff MultiPhaseDiff[k8sStepObjectDst], logger *logrus.Entry) (res reconcile.Result, err error)

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Read

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Read(ctx context.Context, o k8sObject, data map[string]any, logger *logrus.Entry) (read MultiPhaseRead[k8sStepObjectDst], res reconcile.Result, err error)

func (*ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Update

func (h *ObjectMultiPhaseStepReconcilerAction[k8sObject, k8sStepObjectSrc, k8sStepObjectDst]) Update(ctx context.Context, o k8sObject, data map[string]any, objects []k8sStepObjectDst, logger *logrus.Entry) (res reconcile.Result, err error)

Jump to

Keyboard shortcuts

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