Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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
NewContext returns a new Context.
func NewContextWithRecorder ¶ added in v0.1.0
func NewContextWithRecorder(context controllercontext.Context, recorder record.EventRecorder) *Context
NewContextWithRecorder returns a new Context with a custom EventRecorder.
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 processing all Jobs to determine if they can be started, and if so, starts them in a deterministic order and safe from race conditions.
func NewController ¶
func NewController( ctrlContext controllercontext.Context, concurrency *configv1alpha1.Concurrency, ) (*Controller, error)
func (*Controller) GetHealth ¶
func (c *Controller) GetHealth() controllermanager.HealthStatus
func (*Controller) Shutdown ¶
func (c *Controller) Shutdown(ctx context.Context)
type Factory ¶
type Factory struct{}
func NewFactory ¶
func NewFactory() *Factory
func (*Factory) New ¶
func (f *Factory) New( ctrlContext controllercontext.Context, concurrencySpec *configv1alpha1.ExecutionControllerConcurrencySpec, ) (controllermanager.Controller, error)
type IndependentReconciler ¶
type IndependentReconciler struct { *Context // contains filtered or unexported fields }
IndependentReconciler reconciles independent Jobs that do not have any JobConfig.
func NewIndependentReconciler ¶
func NewIndependentReconciler( ctrlContext *Context, concurrency *configv1alpha1.Concurrency, client JobControlInterface, ) *IndependentReconciler
func (*IndependentReconciler) Concurrency ¶
func (r *IndependentReconciler) Concurrency() int
func (*IndependentReconciler) MaxRequeues ¶
func (r *IndependentReconciler) MaxRequeues() int
func (*IndependentReconciler) Name ¶
func (r *IndependentReconciler) Name() string
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 JobControl ¶
type JobControl struct {
// contains filtered or unexported fields
}
JobControl is the default implementation of JobControlInterface.
func NewJobControl ¶
func NewJobControl(client executionv1alpha1.ExecutionV1alpha1Interface, recorder record.EventRecorder) *JobControl
type JobControlInterface ¶
type JobControlInterface interface { StartJob(ctx context.Context, rj *execution.Job) error RejectJob(ctx context.Context, rj *execution.Job, msg string) error }
JobControlInterface is the client interface for the Controller.
type PerConfigReconciler ¶
type PerConfigReconciler struct { *Context // contains filtered or unexported fields }
PerConfigReconciler reconciles Jobs belonging to a JobConfig. It is guaranteed that no two routines will process Jobs belonging to the same JobConfig.
func NewPerConfigReconciler ¶
func NewPerConfigReconciler( ctrlContext *Context, concurrency *configv1alpha1.Concurrency, client JobControlInterface, ) *PerConfigReconciler
func (*PerConfigReconciler) Concurrency ¶
func (w *PerConfigReconciler) Concurrency() int
func (*PerConfigReconciler) MaxRequeues ¶
func (w *PerConfigReconciler) MaxRequeues() int
func (*PerConfigReconciler) Name ¶
func (w *PerConfigReconciler) Name() string