controller

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatedByAnnotation

type CreatedByAnnotation struct {
	Kind       string
	APIVersion string
	Reference  struct {
		Kind            string
		Namespace       string
		Name            string
		UID             string
		APIVersion      string
		ResourceVersion string
	}
}

CreatedByAnnotation type used to match pods created by job

type Kleaner added in v0.7.0

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

Kleaner watches the kubernetes api for changes to Pods and Jobs and delete those according to configured timeouts

func NewKleaner added in v0.7.0

func NewKleaner(ctx context.Context, kclient *kubernetes.Clientset, namespace string, dryRun bool, deleteSuccessfulAfter,
	deleteFailedAfter, deletePendingAfter, deleteOrphanedAfter, deleteEvictedAfter time.Duration, ignoreOwnedByCronjob bool,
	labelSelector string,
	stopCh <-chan struct{}) *Kleaner

NewKleaner creates a new NewKleaner

func (*Kleaner) DeleteJob added in v0.8.0

func (c *Kleaner) DeleteJob(job *batchv1.Job)

func (*Kleaner) DeletePod added in v0.8.0

func (c *Kleaner) DeletePod(pod *corev1.Pod)

func (*Kleaner) Process added in v0.7.0

func (c *Kleaner) Process(obj interface{})

func (*Kleaner) Run added in v0.7.0

func (c *Kleaner) Run()

Run starts the process for listening for pod changes and acting upon those changes.

type PodController

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

PodController watches the kubernetes api for changes to Pods and delete completed Pods without specific annotation

func NewPodController

func NewPodController(ctx context.Context, kclient *kubernetes.Clientset, namespace string, dryRun bool, keepSuccessHours,
	keepFailedHours, keepPendingHours int64, stopCh <-chan struct{}) *PodController

NewPodController creates a new NewPodController

func (*PodController) Process added in v0.5.0

func (c *PodController) Process(obj interface{})

func (*PodController) Run

func (c *PodController) Run()

Run starts the process for listening for pod changes and acting upon those changes.

Jump to

Keyboard shortcuts

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