diff --git a/config/crds/batch_v1alpha1_job.yaml b/config/crds/batch_v1alpha1_job.yaml index 8fe38c32f2..e67a53a07e 100644 --- a/config/crds/batch_v1alpha1_job.yaml +++ b/config/crds/batch_v1alpha1_job.yaml @@ -76,9 +76,9 @@ spec: type: object type: array schedulerName: - description: SchedulerName is the default value of `taskSpecs.template.spec.schedulerName`. + description: SchedulerName is the default value of `tasks.template.spec.schedulerName`. type: string - taskSpecs: + tasks: description: Tasks specifies the task specification of Job items: properties: diff --git a/example/job.yaml b/example/job.yaml index 0deb143200..15e29e252e 100644 --- a/example/job.yaml +++ b/example/job.yaml @@ -18,7 +18,7 @@ spec: resources: requests: storage: 1Gi - taskSpecs: + tasks: - replicas: 6 template: metadata: diff --git a/pkg/apis/batch/v1alpha1/job.go b/pkg/apis/batch/v1alpha1/job.go index 065eb15612..1ceaabe116 100644 --- a/pkg/apis/batch/v1alpha1/job.go +++ b/pkg/apis/batch/v1alpha1/job.go @@ -39,7 +39,7 @@ type Job struct { // JobSpec describes how the job execution will look like and when it will actually run type JobSpec struct { - // SchedulerName is the default value of `taskSpecs.template.spec.schedulerName`. + // SchedulerName is the default value of `tasks.template.spec.schedulerName`. // +optional SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,1,opt,name=schedulerName"` @@ -55,7 +55,7 @@ type JobSpec struct { // Tasks specifies the task specification of Job // +optional - Tasks []TaskSpec `json:"taskSpecs,omitempty" protobuf:"bytes,5,opt,name=taskSpecs"` + Tasks []TaskSpec `json:"tasks,omitempty" protobuf:"bytes,5,opt,name=tasks"` // Specifies the default lifecycle of tasks // +optional