job

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// K8uplabel is a label that is required for the operator to differentiate
	// batchv1.job objects managed by k8up from others.
	K8uplabel = "k8upjob"
	// K8upExclusive is needed to determine if a given job is consideret exclusive or not.
	K8upExclusive = "k8upjob/exclusive"
)

Variables

This section is empty.

Functions

func GetGenericJob

func GetGenericJob(obj Object, config Config) (*batchv1.Job, error)

GetGenericJob returns a generic batchv1.job for further use.

Types

type Config

type Config struct {
	Client     client.Client
	Log        logr.Logger
	CTX        context.Context
	Obj        Object
	Scheme     *runtime.Scheme
	Repository string
}

Config represents the whole context for a given job. It contains everything that is necessary to handle the job.

func NewConfig

func NewConfig(ctx context.Context, client client.Client, log logr.Logger, obj Object, scheme *runtime.Scheme, repository string) Config

NewConfig returns a new configuration.

type Object

type Object interface {
	GetMetaObject() metav1.Object
	GetRuntimeObject() runtime.Object
	GetStatus() *k8upv1alpha1.Status
	GetType() v1alpha1.JobType
	GetResources() corev1.ResourceRequirements
}

Object is an interface that must be implemented by all CRDs that implement a job.

Jump to

Keyboard shortcuts

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