Documentation
¶
Index ¶
- func AddErrand(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func AddJob(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func AddTrigger(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func InferPodState(pod corev1.Pod) ejv1.PodState
- func NewErrandReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, ...) reconcile.Reconciler
- func NewJobReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, ...) (reconcile.Reconciler, error)
- func NewTriggerReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, query Query, ...) reconcile.Reconciler
- type ErrandReconciler
- type PodLogGetter
- type PodLogGetterImpl
- type Query
- type QueryImpl
- type ReconcileJob
- type TriggerReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddErrand ¶
AddErrand creates a new ExtendedJob controller to start errands when their trigger strategy matches
func AddJob ¶
AddJob creates a new ExtendedJob controller and adds it to the Manager
func AddTrigger ¶
AddTrigger creates a new ExtendedJob controller and adds it to the Manager
func InferPodState ¶
InferPodState determines our pod state
ready (p:Running,c:[Initialized Ready ContainersReady PodScheduled]) created (p:Pending,c:[Initialized Ready ContainersReady PodScheduled]) notready (p:Pending,c:[PodScheduled]) notready (p:Pending,c:[]) deleted (p:Running,c:[Initialized PodScheduled],deletionGracePeriodSeconds == 0)
func NewErrandReconciler ¶
func NewErrandReconciler( ctx context.Context, config *config.Config, mgr manager.Manager, f setOwnerReferenceFunc, store vss.VersionedSecretStore, ) reconcile.Reconciler
NewErrandReconciler returns a new reconciler for errand jobs
Types ¶
type ErrandReconciler ¶
type ErrandReconciler struct {
// contains filtered or unexported fields
}
ErrandReconciler implements the Reconciler interface
type PodLogGetter ¶
PodLogGetter fetches the logs from a Pod
func NewPodLogGetter ¶
func NewPodLogGetter(client corev1client.CoreV1Interface) PodLogGetter
NewPodLogGetter returns an instance of a PodLogGetterImpl
type PodLogGetterImpl ¶
type PodLogGetterImpl struct {
// contains filtered or unexported fields
}
PodLogGetterImpl implements the PodLogGetter interface
func (*PodLogGetterImpl) Get ¶
func (p *PodLogGetterImpl) Get(namespace, podName, containerName string) ([]byte, error)
Get fetches the logs for the given pod
type Query ¶
type Query interface {
Match(ejv1.ExtendedJob, corev1.Pod) bool
MatchState(ejv1.ExtendedJob, ejv1.PodState) bool
}
Query for events involving pods and filter them
type QueryImpl ¶
type QueryImpl struct {
}
QueryImpl implements the query interface
func (*QueryImpl) Match ¶
Match pod against label whitelist from extended job
type ReconcileJob ¶
type ReconcileJob struct {
// contains filtered or unexported fields
}
ReconcileJob reconciles an Job object
func (*ReconcileJob) Reconcile ¶
Reconcile reads that state of the cluster for a Job object that is owned by an ExtendedJob and makes changes based on the state read and what is in the ExtendedJob.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
type TriggerReconciler ¶
type TriggerReconciler struct {
// contains filtered or unexported fields
}
TriggerReconciler implements the Reconciler interface
Source Files
¶
- errand_controller.go
- errand_reconciler.go
- job_controller.go
- job_reconciler.go
- pod_log_getter.go
- pod_state.go
- query.go
- trigger_controller.go
- trigger_reconciler.go