jobconfigcontroller

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterJobs

func FilterJobs(items []*execution.Job, filterFunc FilterFunc) []*execution.Job

FilterJobs filters a list of Job.

func IsJobConfigStatusEqual

func IsJobConfigStatusEqual(orig, updated *execution.JobConfig) (bool, error)

IsJobConfigStatusEqual returns true if the JobConfigStatus is not equal for a JobConfig.

func ToJobReferences

func ToJobReferences(items []*execution.Job) []execution.JobReference

ToJobReferences converts a list of Jobs to a list of JobReferences.

Types

type Context

type Context struct {
	controllercontext.Context
	// contains filtered or unexported fields
}

Context extends the common controllercontext.Context.

func NewContext

func NewContext(context controllercontext.Context) *Context

func NewContextWithRecorder added in v0.1.0

func NewContextWithRecorder(context controllercontext.Context, recorder record.EventRecorder) *Context

func (*Context) GetHasSynced added in v0.1.0

func (c *Context) GetHasSynced() []cache.InformerSynced

type Controller

type Controller struct {
	*Context
	// contains filtered or unexported fields
}

Controller is responsible for reconciling the status of JobConfigs from their downstream Jobs.

func NewController

func NewController(
	ctrlContext controllercontext.Context,
	concurrency *configv1alpha1.Concurrency,
) (*Controller, error)

func (*Controller) GetHealth

func (c *Controller) GetHealth() controllermanager.HealthStatus

func (*Controller) Run

func (c *Controller) Run(ctx context.Context) error

func (*Controller) Shutdown

func (c *Controller) Shutdown(ctx context.Context)

type Factory

type Factory struct{}

func NewFactory

func NewFactory() *Factory

func (*Factory) Name

func (f *Factory) Name() string

func (*Factory) New

type FilterFunc

type FilterFunc func(*execution.Job) bool

type InformerWorker

type InformerWorker struct {
	*Context
}

InformerWorker receives events from the informer and enqueues work to be done for the controller.

func NewInformerWorker

func NewInformerWorker(ctrlContext *Context) *InformerWorker

func (*InformerWorker) WorkerName

func (w *InformerWorker) WorkerName() string

type Reconciler

type Reconciler struct {
	*Context
	// contains filtered or unexported fields
}

func NewReconciler

func NewReconciler(ctrlContext *Context, concurrency *configv1alpha1.Concurrency) *Reconciler

func (*Reconciler) Concurrency

func (w *Reconciler) Concurrency() int

func (*Reconciler) MaxRequeues

func (w *Reconciler) MaxRequeues() int

func (*Reconciler) Name

func (w *Reconciler) Name() string

func (*Reconciler) SyncOne

func (w *Reconciler) SyncOne(ctx context.Context, namespace, name string, _ int) error

Jump to

Keyboard shortcuts

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