From 288feb1953657f8f68de91e95d8fbca95633bb2c Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 29 Jan 2019 11:32:42 +0800 Subject: [PATCH] replace taskSpecs with tasks --- config/crds/batch_v1alpha1_job.yaml | 4 ++-- example/job.yaml | 2 +- pkg/apis/batch/v1alpha1/job.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/crds/batch_v1alpha1_job.yaml b/config/crds/batch_v1alpha1_job.yaml index 09f16ccd1a..449b64f6f6 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 51c104ac6b..f8e59664bb 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