Documentation ¶
Index ¶
- type ComposabilityRequestAdapter
- func (adapter *ComposabilityRequestAdapter) EnsureComposabilityRequestDeletionProcessed() (util.OperationResult, error)
- func (adapter *ComposabilityRequestAdapter) EnsureFinalizer() (util.OperationResult, error)
- func (adapter *ComposabilityRequestAdapter) EnsureStateSetup() (util.OperationResult, error)
- func (adapter *ComposabilityRequestAdapter) RequeueStatusUpdate(status string) (result util.OperationResult, err error)
- func (adapter *ComposabilityRequestAdapter) RequeueUpdateCRD() (result util.OperationResult, err error)
- type ComposabilityRequestReconciler
- func (r *ComposabilityRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ComposabilityRequestReconciler) ReconcileHandler(adapter *ComposabilityRequestAdapter) (reconcile.Result, error)
- func (r *ComposabilityRequestReconciler) SetupWithManager(mgr ctrl.Manager) error
- type ReconcileOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComposabilityRequestAdapter ¶
type ComposabilityRequestAdapter struct {
// contains filtered or unexported fields
}
func NewComposabilityRequestAdapter ¶
func NewComposabilityRequestAdapter(instance *v1alpha1.ComposabilityRequest, logger logr.Logger, client client.Client, clientSet *kubernetes.Clientset) *ComposabilityRequestAdapter
NewComposabilityRequestAdapter return a new adapter
func (*ComposabilityRequestAdapter) EnsureComposabilityRequestDeletionProcessed ¶
func (adapter *ComposabilityRequestAdapter) EnsureComposabilityRequestDeletionProcessed() (util.OperationResult, error)
EnsureComposabilityRequestDeletionProcessed is checking if the CRD has been deleted. If yes, it removes the CRD finalizer and stops the adapter queue. Otherwise it continues to the next function in the adapter queue
func (*ComposabilityRequestAdapter) EnsureFinalizer ¶
func (adapter *ComposabilityRequestAdapter) EnsureFinalizer() (util.OperationResult, error)
EnsureFinalizer is checking if the CRD has the appropriate finalizer. If yes, it continues to the next function in the adapter queue. Otherwise it adds the finalizer and does a requeue
func (*ComposabilityRequestAdapter) EnsureStateSetup ¶
func (adapter *ComposabilityRequestAdapter) EnsureStateSetup() (util.OperationResult, error)
EnsureStateSetup is checking that the connection state of the CRD is properly reflected to the cluster
func (*ComposabilityRequestAdapter) RequeueStatusUpdate ¶
func (adapter *ComposabilityRequestAdapter) RequeueStatusUpdate(status string) (result util.OperationResult, err error)
RequeueStatusUpdate Requeues the Reconcile loop appropriately while updating the status of a composability request
func (*ComposabilityRequestAdapter) RequeueUpdateCRD ¶
func (adapter *ComposabilityRequestAdapter) RequeueUpdateCRD() (result util.OperationResult, err error)
RequeueUpdateCRD Requeues the Reconcile loop appropriately while updating the composability request
type ComposabilityRequestReconciler ¶
type ComposabilityRequestReconciler struct { client.Client ClientSet *kubernetes.Clientset Log logr.Logger Scheme *runtime.Scheme }
ComposabilityRequestReconciler reconciles a ComposabilityRequest object
func (*ComposabilityRequestReconciler) Reconcile ¶
func (r *ComposabilityRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ComposabilityRequest object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile
func (*ComposabilityRequestReconciler) ReconcileHandler ¶
func (r *ComposabilityRequestReconciler) ReconcileHandler(adapter *ComposabilityRequestAdapter) (reconcile.Result, error)
func (*ComposabilityRequestReconciler) SetupWithManager ¶
func (r *ComposabilityRequestReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ReconcileOperation ¶
type ReconcileOperation func() (util.OperationResult, error)