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).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.