Documentation ¶
Index ¶
- Constants
- Variables
- func GetWorkloadNameForJob(jobName string) string
- func SetupIndexes(ctx context.Context, indexer client.FieldIndexer) error
- func SetupWebhook(mgr ctrl.Manager, opts ...jobframework.Option) error
- type Job
- func (j *Job) Finished() (metav1.Condition, bool)
- func (j *Job) GVK() schema.GroupVersionKind
- func (j *Job) IsActive() bool
- func (j *Job) IsSuspended() bool
- func (j *Job) Object() client.Object
- func (j *Job) PodSets() []kueue.PodSet
- func (j *Job) PodsReady() bool
- func (j *Job) ReclaimablePods() ([]kueue.ReclaimablePod, error)
- func (j *Job) RestorePodSetsInfo(podSetsInfo []podset.PodSetInfo) bool
- func (j *Job) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error
- func (j *Job) Stop(ctx context.Context, c client.Client, podSetsInfo []podset.PodSetInfo, ...) (bool, error)
- func (j *Job) Suspend()
- type JobWebhook
- func (w *JobWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (w *JobWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *JobWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *JobWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
View Source
const ( JobMinParallelismAnnotation = "kueue.x-k8s.io/job-min-parallelism" JobCompletionsEqualParallelismAnnotation = "kueue.x-k8s.io/job-completions-equal-parallelism" )
Variables ¶
View Source
var (
FrameworkName = "batch/job"
)
View Source
var (
ManagedLabels = []string{legacyJobNameLabel, legacyControllerUidLabel, batchv1.JobNameLabel, batchv1.ControllerUidLabel}
)
The following labels are managed internally by batch/job controller, we should not propagate them to the workload.
View Source
var NewReconciler = jobframework.NewGenericReconcilerFactory( func() jobframework.GenericJob { return &Job{} }, func(b *builder.Builder, c client.Client) *builder.Builder { return b.Watches(&kueue.Workload{}, &parentWorkloadHandler{client: c}) }, )
Functions ¶
func GetWorkloadNameForJob ¶
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.
Types ¶
type Job ¶
func (*Job) GVK ¶ added in v0.5.0
func (j *Job) GVK() schema.GroupVersionKind
func (*Job) IsSuspended ¶
func (*Job) ReclaimablePods ¶ added in v0.4.0
func (j *Job) ReclaimablePods() ([]kueue.ReclaimablePod, error)
func (*Job) RestorePodSetsInfo ¶ added in v0.4.0
func (j *Job) RestorePodSetsInfo(podSetsInfo []podset.PodSetInfo) bool
func (*Job) RunWithPodSetsInfo ¶ added in v0.4.0
func (j *Job) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error
func (*Job) Stop ¶ added in v0.4.0
func (j *Job) Stop(ctx context.Context, c client.Client, podSetsInfo []podset.PodSetInfo, _ jobframework.StopReason, eventMsg string) (bool, error)
type JobWebhook ¶
type JobWebhook struct {
// contains filtered or unexported fields
}
func (*JobWebhook) Default ¶
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) (admission.Warnings, 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) (admission.Warnings, 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) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type
Click to show internal directories.
Click to hide internal directories.