job

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FrameworkName = "batch/job"
)

Functions

func GetWorkloadNameForJob

func GetWorkloadNameForJob(jobName string) string

func SetupIndexes

func SetupIndexes(ctx context.Context, indexer client.FieldIndexer) error

func SetupWebhook

func SetupWebhook(mgr ctrl.Manager, opts ...jobframework.Option) error

SetupWebhook configures the webhook for batchJob.

func WebhookType

func WebhookType() runtime.Object

Types

type Job

type Job struct {
	batchv1.Job
}

func (*Job) EquivalentToWorkload

func (j *Job) EquivalentToWorkload(wl kueue.Workload) bool

func (*Job) Finished

func (j *Job) Finished() (metav1.Condition, bool)

func (*Job) GetGVK

func (j *Job) GetGVK() schema.GroupVersionKind

func (*Job) IsActive

func (j *Job) IsActive() bool

func (*Job) IsSuspended

func (j *Job) IsSuspended() bool

func (*Job) Object

func (j *Job) Object() client.Object

func (*Job) PodSets

func (j *Job) PodSets() []kueue.PodSet

func (*Job) PodsReady

func (j *Job) PodsReady() bool

func (*Job) PriorityClass

func (j *Job) PriorityClass() string

func (*Job) ResetStatus

func (j *Job) ResetStatus() bool

func (*Job) RestoreNodeAffinity

func (j *Job) RestoreNodeAffinity(nodeSelectors []jobframework.PodSetNodeSelector)

func (*Job) RunWithNodeAffinity

func (j *Job) RunWithNodeAffinity(nodeSelectors []jobframework.PodSetNodeSelector)

func (*Job) Suspend

func (j *Job) Suspend()

type JobReconciler

type JobReconciler jobframework.JobReconciler

JobReconciler reconciles a Job object

func NewReconciler

func NewReconciler(
	scheme *runtime.Scheme,
	client client.Client,
	record record.EventRecorder,
	opts ...jobframework.Option) *JobReconciler

func (*JobReconciler) Reconcile

func (r *JobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*JobReconciler) SetupWithManager

func (r *JobReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager. It indexes workloads based on the owning jobs.

type JobWebhook

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

func (*JobWebhook) Default

func (w *JobWebhook) Default(ctx context.Context, obj runtime.Object) error

Default implements webhook.CustomDefaulter so a webhook will be registered for the type

func (*JobWebhook) ValidateCreate

func (w *JobWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) error

ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type

func (*JobWebhook) ValidateDelete

func (w *JobWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) error

ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type

func (*JobWebhook) ValidateUpdate

func (w *JobWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) error

ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type

Jump to

Keyboard shortcuts

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