Rename ScheduledJob to CronJob

This commit is contained in:
Maciej Szulik
2016-11-01 23:46:23 +01:00
parent 0c7421fb51
commit 41d88d30dd
73 changed files with 1805 additions and 1804 deletions

View File

@@ -158,14 +158,14 @@ func ValidateJobStatusUpdate(status, oldStatus batch.JobStatus) field.ErrorList
return allErrs
}
func ValidateScheduledJob(scheduledJob *batch.ScheduledJob) field.ErrorList {
// ScheduledJobs and rcs have the same name validation
func ValidateCronJob(scheduledJob *batch.CronJob) field.ErrorList {
// CronJobs and rcs have the same name validation
allErrs := apivalidation.ValidateObjectMeta(&scheduledJob.ObjectMeta, true, apivalidation.ValidateReplicationControllerName, field.NewPath("metadata"))
allErrs = append(allErrs, ValidateScheduledJobSpec(&scheduledJob.Spec, field.NewPath("spec"))...)
allErrs = append(allErrs, ValidateCronJobSpec(&scheduledJob.Spec, field.NewPath("spec"))...)
return allErrs
}
func ValidateScheduledJobSpec(spec *batch.ScheduledJobSpec, fldPath *field.Path) field.ErrorList {
func ValidateCronJobSpec(spec *batch.CronJobSpec, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
if len(spec.Schedule) == 0 {