cronjobs

package
v0.4.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelClusterScan = "zora.undistro.io/cluster-scan"
	LabelPlugin      = "zora.undistro.io/plugin"
)

Variables

This section is empty.

Functions

func New

func New(name, namespace string) *batchv1.CronJob

Types

type Mutator

type Mutator struct {
	Scheme             *runtime.Scheme
	Existing           *batchv1.CronJob
	Plugin             *v1alpha1.Plugin
	PluginRef          v1alpha1.PluginReference
	ClusterScan        *v1alpha1.ClusterScan
	KubeconfigSecret   *corev1.Secret
	WorkerImage        string
	ServiceAccountName string
	Suspend            bool
}

func (*Mutator) Mutate

func (r *Mutator) Mutate() (controllerutil.MutateFn, int)

Mutate returns a function which mutates the existing CronJob into it's desired state, as well as the required delay for the first scan execution. The delay is represented in absolute minutes, where 1 minute is subtracted from it to allow the Cronjob to be created before the scan start time.

Jump to

Keyboard shortcuts

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