validation

package
v1.23.13-rc.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 64

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCronJob added in v1.5.0

func ValidateCronJob(cronJob *batch.CronJob, opts apivalidation.PodValidationOptions) field.ErrorList

ValidateCronJob validates a CronJob and returns an ErrorList with any errors.

func ValidateCronJobSpec added in v1.5.0

func ValidateCronJobSpec(spec *batch.CronJobSpec, fldPath *field.Path, opts apivalidation.PodValidationOptions) field.ErrorList

ValidateCronJobSpec validates a CronJobSpec and returns an ErrorList with any errors.

func ValidateCronJobUpdate added in v1.9.0

func ValidateCronJobUpdate(job, oldJob *batch.CronJob, opts apivalidation.PodValidationOptions) field.ErrorList

ValidateCronJobUpdate validates an update to a CronJob and returns an ErrorList with any errors.

func ValidateGeneratedSelector

func ValidateGeneratedSelector(obj *batch.Job) field.ErrorList

ValidateGeneratedSelector validates that the generated selector on a controller object match the controller object metadata, and the labels on the pod template are as generated.

TODO: generalize for other controller objects that will follow the same pattern, such as ReplicaSet and DaemonSet, and move to new location. Replace batch.Job with an interface.

func ValidateJob

func ValidateJob(job *batch.Job, opts JobValidationOptions) field.ErrorList

ValidateJob validates a Job and returns an ErrorList with any errors.

func ValidateJobSpec

func ValidateJobSpec(spec *batch.JobSpec, fldPath *field.Path, opts apivalidation.PodValidationOptions) field.ErrorList

ValidateJobSpec validates a JobSpec and returns an ErrorList with any errors.

func ValidateJobSpecUpdate

func ValidateJobSpecUpdate(spec, oldSpec batch.JobSpec, fldPath *field.Path, opts JobValidationOptions) field.ErrorList

ValidateJobSpecUpdate validates an update to a JobSpec and returns an ErrorList with any errors.

func ValidateJobStatusUpdate

func ValidateJobStatusUpdate(status, oldStatus batch.JobStatus) field.ErrorList

ValidateJobStatusUpdate validates an update to a JobStatus and returns an ErrorList with any errors.

func ValidateJobTemplate

func ValidateJobTemplate(job *batch.JobTemplate, opts apivalidation.PodValidationOptions) field.ErrorList

ValidateJobTemplate validates a JobTemplate and returns an ErrorList with any errors.

func ValidateJobTemplateSpec

func ValidateJobTemplateSpec(spec *batch.JobTemplateSpec, fldPath *field.Path, opts apivalidation.PodValidationOptions) field.ErrorList

ValidateJobTemplateSpec validates a JobTemplateSpec and returns an ErrorList with any errors.

func ValidateJobUpdate

func ValidateJobUpdate(job, oldJob *batch.Job, opts JobValidationOptions) field.ErrorList

ValidateJobUpdate validates an update to a Job and returns an ErrorList with any errors.

func ValidateJobUpdateStatus

func ValidateJobUpdateStatus(job, oldJob *batch.Job) field.ErrorList

ValidateJobUpdateStatus validates an update to the status of a Job and returns an ErrorList with any errors.

Types

type JobValidationOptions added in v1.22.0

type JobValidationOptions struct {
	apivalidation.PodValidationOptions
	// Allow Job to have the annotation batch.kubernetes.io/job-tracking
	AllowTrackingAnnotation bool
	// Allow mutable node affinity, selector and tolerations of the template
	AllowMutableSchedulingDirectives bool
}

Jump to

Keyboard shortcuts

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