package validation
import "k8s.io/kubernetes/pkg/apis/batch/validation"
Index ¶
- func IsConditionTrue(list []batch.JobCondition, cType batch.JobConditionType) bool
- func IsJobComplete(job *batch.Job) bool
- func IsJobFailed(job *batch.Job) bool
- func IsJobFinished(job *batch.Job) bool
- func ValidateCronJobCreate(cronJob *batch.CronJob, opts apivalidation.PodValidationOptions) field.ErrorList
- func ValidateCronJobUpdate(job, oldJob *batch.CronJob, opts apivalidation.PodValidationOptions) field.ErrorList
- func ValidateJob(job *batch.Job, opts JobValidationOptions) field.ErrorList
- func ValidateJobSpec(spec *batch.JobSpec, fldPath *field.Path, opts apivalidation.PodValidationOptions) field.ErrorList
- func ValidateJobSpecUpdate(spec, oldSpec batch.JobSpec, fldPath *field.Path, opts JobValidationOptions) field.ErrorList
- func ValidateJobStatusUpdate(job, oldJob *batch.Job, opts JobStatusValidationOptions) field.ErrorList
- func ValidateJobTemplateSpec(spec *batch.JobTemplateSpec, fldPath *field.Path, opts apivalidation.PodValidationOptions) field.ErrorList
- func ValidateJobUpdate(job, oldJob *batch.Job, opts JobValidationOptions) field.ErrorList
- func ValidateJobUpdateStatus(job, oldJob *batch.Job, opts JobStatusValidationOptions) field.ErrorList
- type JobStatusValidationOptions
- type JobValidationOptions
Functions ¶
func IsConditionTrue ¶
func IsConditionTrue(list []batch.JobCondition, cType batch.JobConditionType) bool
func IsJobComplete ¶
func IsJobFailed ¶
func IsJobFinished ¶
func ValidateCronJobCreate ¶
func ValidateCronJobCreate(cronJob *batch.CronJob, opts apivalidation.PodValidationOptions) field.ErrorList
ValidateCronJobCreate validates a CronJob on creation and returns an ErrorList with any errors.
func ValidateCronJobUpdate ¶
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 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(job, oldJob *batch.Job, opts JobStatusValidationOptions) field.ErrorList
ValidateJobStatusUpdate validates an update to a JobStatus 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, opts JobStatusValidationOptions) field.ErrorList
ValidateJobUpdateStatus validates an update to the status of a Job and returns an ErrorList with any errors.
Types ¶
type JobStatusValidationOptions ¶
type JobStatusValidationOptions struct { RejectDecreasingSucceededCounter bool RejectDecreasingFailedCounter bool RejectDisablingTerminalCondition bool RejectInvalidCompletedIndexes bool RejectInvalidFailedIndexes bool RejectFailedIndexesOverlappingCompleted bool RejectCompletedIndexesForNonIndexedJob bool RejectFailedIndexesForNoBackoffLimitPerIndex bool RejectFailedJobWithoutFailureTarget bool RejectCompleteJobWithoutSuccessCriteriaMet bool RejectFinishedJobWithActivePods bool RejectFinishedJobWithoutStartTime bool RejectFinishedJobWithUncountedTerminatedPods bool RejectStartTimeUpdateForUnsuspendedJob bool RejectCompletionTimeBeforeStartTime bool RejectMutatingCompletionTime bool RejectCompleteJobWithoutCompletionTime bool RejectNotCompleteJobWithCompletionTime bool RejectCompleteJobWithFailedCondition bool RejectCompleteJobWithFailureTargetCondition bool AllowForSuccessCriteriaMetInExtendedScope bool RejectMoreReadyThanActivePods bool RejectFinishedJobWithTerminatingPods bool }
type JobValidationOptions ¶
type JobValidationOptions struct { apivalidation.PodValidationOptions // Allow mutable node affinity, selector and tolerations of the template AllowMutableSchedulingDirectives bool // Require Job to have the label on batch.kubernetes.io/job-name and batch.kubernetes.io/controller-uid RequirePrefixedLabels bool }
Source Files ¶
validation.go
- Version
- v1.33.1 (latest)
- Published
- May 15, 2025
- Platform
- linux/amd64
- Imports
- 18 packages
- Last checked
- 13 hours ago –
Tools for package owners.