Documentation ¶
Index ¶
- Constants
- func New(logger *zap.Logger, client kubernetes.Interface, cfg api.Config) *worker
- func NewInformerFactory(k8s kubernetes.Interface, tags []string) (informers.SharedInformerFactory, error)
- func NewJobWrapper(logger *zap.Logger, job *monitor.Job, config api.Config) *jobWrapper
- func NewPodCompletionWatcher(logger *zap.Logger, k8s kubernetes.Interface) *completionsWatcher
- type KubernetesPlugin
- type MaxInFlightLimiter
- func (l *MaxInFlightLimiter) Create(ctx context.Context, job *monitor.Job) error
- func (l *MaxInFlightLimiter) InFlight() int
- func (l *MaxInFlightLimiter) OnAdd(obj interface{})
- func (l *MaxInFlightLimiter) OnDelete(obj interface{})
- func (l *MaxInFlightLimiter) OnUpdate(_, obj interface{})
- func (l *MaxInFlightLimiter) RegisterInformer(ctx context.Context, factory informers.SharedInformerFactory) error
- type Metadata
Constants ¶
View Source
const (
AgentContainerName = "agent"
)
Variables ¶
This section is empty.
Functions ¶
func NewInformerFactory ¶ added in v0.3.0
func NewInformerFactory(k8s kubernetes.Interface, tags []string) (informers.SharedInformerFactory, error)
returns an informer factory configured to watch resources (pods, jobs) created by the scheduler
func NewJobWrapper ¶ added in v0.4.0
func NewPodCompletionWatcher ¶ added in v0.3.0
func NewPodCompletionWatcher(logger *zap.Logger, k8s kubernetes.Interface) *completionsWatcher
Types ¶
type KubernetesPlugin ¶
type MaxInFlightLimiter ¶ added in v0.3.0
type MaxInFlightLimiter struct { MaxInFlight int // contains filtered or unexported fields }
func NewLimiter ¶ added in v0.3.0
func NewLimiter(logger *zap.Logger, scheduler monitor.JobHandler, maxInFlight int) *MaxInFlightLimiter
func (*MaxInFlightLimiter) InFlight ¶ added in v0.4.0
func (l *MaxInFlightLimiter) InFlight() int
func (*MaxInFlightLimiter) OnAdd ¶ added in v0.3.0
func (l *MaxInFlightLimiter) OnAdd(obj interface{})
load jobs at controller startup/restart
func (*MaxInFlightLimiter) OnDelete ¶ added in v0.3.0
func (l *MaxInFlightLimiter) OnDelete(obj interface{})
if jobs are deleted before they complete, ensure we remove them from inFlight
func (*MaxInFlightLimiter) OnUpdate ¶ added in v0.3.0
func (l *MaxInFlightLimiter) OnUpdate(_, obj interface{})
if a job is still running, add it to inFlight, otherwise try to remove it
func (*MaxInFlightLimiter) RegisterInformer ¶ added in v0.3.0
func (l *MaxInFlightLimiter) RegisterInformer(ctx context.Context, factory informers.SharedInformerFactory) error
Creates a Jobs informer, registers the handler on it, and waits for cache sync
Click to show internal directories.
Click to hide internal directories.