controllers

package
v0.0.0-...-5e84c48 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManifestRateLimiter

func ManifestRateLimiter(failureBaseDelay time.Duration, failureMaxDelay time.Duration,
	frequency int, burst int,
) ratelimiter.RateLimiter

Types

type ManifestReconciler

type ManifestReconciler struct {
	client.Client
	Scheme           *runtime.Scheme
	RESTConfig       *rest.Config
	DeployChan       chan OperationRequest
	Workers          *ManifestWorkerPool
	RequeueIntervals RequeueIntervals
	CacheManager     types.CacheManager
	internalTypes.ReconcileFlagConfig
	CacheSyncTimeout time.Duration
}

ManifestReconciler reconciles a Manifest object.

func (*ManifestReconciler) HandleCharts

func (r *ManifestReconciler) HandleCharts(deployInfo types.InstallInfo, mode internalTypes.Mode,
	logger logr.Logger,
) *internalTypes.InstallResponse

func (*ManifestReconciler) HandleDeletingState

func (r *ManifestReconciler) HandleDeletingState(ctx context.Context, logger logr.Logger,
	manifestObj *v1alpha1.Manifest,
) error

func (*ManifestReconciler) HandleInitialState

func (r *ManifestReconciler) HandleInitialState(ctx context.Context, _ logr.Logger, manifestObj *v1alpha1.Manifest,
) error

func (*ManifestReconciler) HandleProcessingState

func (r *ManifestReconciler) HandleProcessingState(ctx context.Context, logger logr.Logger,
	manifestObj *v1alpha1.Manifest,
) error

func (*ManifestReconciler) HandleReadyState

func (r *ManifestReconciler) HandleReadyState(ctx context.Context, logger logr.Logger, manifestObj *v1alpha1.Manifest,
) error

func (*ManifestReconciler) Reconcile

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

func (*ManifestReconciler) ResponseHandlerFunc

func (r *ManifestReconciler) ResponseHandlerFunc(ctx context.Context, logger logr.Logger, chartCount int,
	responseChan internalTypes.ResponseChan, namespacedName client.ObjectKey,
)

func (*ManifestReconciler) SetupWithManager

func (r *ManifestReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager,
	failureBaseDelay time.Duration, failureMaxDelay time.Duration, frequency int, burst int, listenerAddr string,
) error

SetupWithManager sets up the controller with the Manager.

type ManifestWorkerPool

type ManifestWorkerPool struct {
	Workers
	// contains filtered or unexported fields
}

func NewManifestWorkers

func NewManifestWorkers(logger logr.Logger, workersConcurrentManifests int) *ManifestWorkerPool

func (*ManifestWorkerPool) GetWorkerPoolSize

func (mw *ManifestWorkerPool) GetWorkerPoolSize() int

func (*ManifestWorkerPool) SetWorkerPoolSize

func (mw *ManifestWorkerPool) SetWorkerPoolSize(newSize int)

func (*ManifestWorkerPool) StartWorkers

type OperationRequest

type OperationRequest struct {
	Info         types.InstallInfo
	Mode         internalTypes.Mode
	ResponseChan internalTypes.ResponseChan
}

type RequeueIntervals

type RequeueIntervals struct {
	Success time.Duration
}

type Workers

type Workers interface {
	GetWorkerPoolSize() int
	SetWorkerPoolSize(newSize int)
	StartWorkers(ctx context.Context, jobChan <-chan manifestTypes.InstallInfo,
		handlerFn func(info manifestTypes.InstallInfo, logger logr.Logger) *internalTypes.InstallResponse)
}

Jump to

Keyboard shortcuts

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