component

package
v0.0.0-...-981f52d Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentCreatedPredicate

func ComponentCreatedPredicate() predicate.Predicate

ComponentCreatedPredicate returns a predicate which filters out only components that are the result of a create event

func ComponentDeletedPredicate

func ComponentDeletedPredicate() predicate.Predicate

ComponentDeletedPredicate returns a predicate which filters out only components that have been marked for deletion. This is achieved by watching updates to components with an update to the components DeletionTimestamp has been updated

func SetupController

func SetupController(manager ctrl.Manager, log *logr.Logger) error

SetupController creates a new Component controller and adds it to the Manager.

Types

type Adapter

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

Adapter holds the objects needed to reconcile a integration PipelineRun.

func NewAdapter

func NewAdapter(component *applicationapiv1alpha1.Component, application *applicationapiv1alpha1.Application, logger h.IntegrationLogger, loader loader.ObjectLoader, client client.Client,
	context context.Context) *Adapter

NewAdapter creates and returns an Adapter instance.

func (*Adapter) EnsureComponentHasFinalizer

func (a *Adapter) EnsureComponentHasFinalizer() (controller.OperationResult, error)

EnsureComponentHasFinalizer is an operation that will ensure components that have been created are assigned a finalizer

func (*Adapter) EnsureComponentIsCleanedUp

func (a *Adapter) EnsureComponentIsCleanedUp() (controller.OperationResult, error)

EnsureComponentIsCleanedUp is an operation that will ensure components marked for deletion have a snapshot created without said component

type AdapterInterface

type AdapterInterface interface {
	EnsureComponentHasFinalizer() (controller.OperationResult, error)
	EnsureComponentIsCleanedUp() (controller.OperationResult, error)
}

AdapterInterface is an interface defining all the operations that should be defined in an Integration adapter.

type Reconciler

type Reconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

Reconciler reconciles a component object

func NewComponentReconciler

func NewComponentReconciler(client client.Client, logger *logr.Logger, scheme *runtime.Scheme) *Reconciler

NewComponentReconciler creates and returns a Reconciler.

func (*Reconciler) Reconcile

func (r *Reconciler) 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.

Jump to

Keyboard shortcuts

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