controllers

package
v0.0.0-...-7f9a46d Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 29 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
	RestMapper              *restmapper.DeferredDiscoveryRESTMapper
	DeployChan              chan OperationRequest
	Workers                 *ManifestWorkerPool
	RequeueIntervals        RequeueIntervals
	MaxConcurrentReconciles int
	CheckReadyStates        bool
	CustomStateCheck        bool
	Codec                   *types.Codec
	InsecureRegistry        bool
}

ManifestReconciler reconciles a Manifest object.

func (*ManifestReconciler) HandleCharts

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

func (*ManifestReconciler) HandleDeletingState

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

func (*ManifestReconciler) HandleErrorState

func (r *ManifestReconciler) HandleErrorState(ctx context.Context, 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 manifest.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

func (mw *ManifestWorkerPool) StartWorkers(ctx context.Context, jobChan <-chan OperationRequest,
	handlerFn func(info manifest.InstallInfo, mode manifest.Mode, logger *logr.Logger) *manifest.InstallResponse,
)

type OperationRequest

type OperationRequest struct {
	Info         manifest.InstallInfo
	Mode         manifest.Mode
	ResponseChan manifest.ResponseChan
}

type RequeueIntervals

type RequeueIntervals struct {
	Success time.Duration
	Failure time.Duration
	Waiting time.Duration
}

type Workers

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

Jump to

Keyboard shortcuts

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