kubernetes: k8s.io/kubernetes/pkg/controller/ttlafterfinished Index | Files | Directories

package ttlafterfinished

import "k8s.io/kubernetes/pkg/controller/ttlafterfinished"

Index

Package Files

ttlafterfinished_controller.go

type Controller Uses

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

Controller watches for changes of Jobs API objects. Triggered by Job creation and updates, it enqueues Jobs that have non-nil `.spec.ttlSecondsAfterFinished` to the `queue`. The Controller has workers who consume `queue`, check whether the Job TTL has expired or not; if the Job TTL hasn't expired, it will add the Job to the queue after the TTL is expected to expire; if the TTL has expired, the worker will send requests to the API server to delete the Jobs accordingly. This is implemented outside of Job controller for separation of concerns, and because it will be extended to handle other finishable resource types.

func New Uses

func New(jobInformer batchinformers.JobInformer, client clientset.Interface) *Controller

New creates an instance of Controller

func (*Controller) Run Uses

func (tc *Controller) Run(workers int, stopCh <-chan struct{})

Run starts the workers to clean up Jobs.

Directories

PathSynopsis
config
config/v1alpha1

Package ttlafterfinished imports 21 packages (graph) and is imported by 5 packages. Updated 2019-11-17. Refresh now. Tools for package owners.