job

package
v0.0.0-...-1670326 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildForControlledJob

func BuildForControlledJob(ctx context.Context, controlledJob *batch.ControlledJob, scheduledTime time.Time, jobRunIdx int, isManuallyScheduled, startSuspended bool) (*kbatch.Job, error)

We need to construct a job based on our ControlledJob's template. We'll copy over the spec from the template and copy some basic object meta. Then, we'll set the "scheduled time" annotation so that we can reconstitute our `LastScheduleTime` field each reconcile. Finally, we'll need to set an owner reference. This allows the Kubernetes garbage collector to clean up jobs when we delete the ControlledJob, and allows controller-runtime to figure out which controlledjob needs to be reconciled when a given job changes (is added, deleted, completes, etc).

func RecreateJobWithNewSpec

func RecreateJobWithNewSpec(ctx context.Context, existingJob *kbatch.Job, controlledJob *batch.ControlledJob, jobRunIdx int, startSuspended bool) (*kbatch.Job, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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