Skip to content

Commit

Permalink
Merge branch 'cleanup-taskspecs' into 'master'
Browse files Browse the repository at this point in the history
Rename job.spec.taskSpecs to tasks everywhere

fixes: volcano-sh#38

Issues info:
Issue ID: 38
Title: Rename job.spec.taskSpecs to tasks everywhere
Issue url: CBU-PaaS/Community/volcano/volcano#38


See merge request CBU-PaaS/Community/volcano/volcano!18
  • Loading branch information
mada 00483107 committed Feb 20, 2019
2 parents 8e90652 + 288feb1 commit 90c3b30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/crds/batch_v1alpha1_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion example/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
resources:
requests:
storage: 1Gi
taskSpecs:
tasks:
- replicas: 6
template:
metadata:
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/batch/v1alpha1/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand All @@ -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
Expand Down

0 comments on commit 90c3b30

Please sign in to comment.