Skip to content

Commit

Permalink
Add SchedulerName to TaskRunSpec
Browse files Browse the repository at this point in the history
Set scheduler in TaskRunSpec to execute Tasks with specific schedulers.
  • Loading branch information
waveywaves committed Jan 6, 2020
1 parent fe94a0f commit a911699
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/apis/pipeline/v1alpha1/taskrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ type TaskRunSpec struct {
// Workspaces is a list of WorkspaceBindings from volumes to workspaces.
// +optional
Workspaces []WorkspaceBinding `json:"workspaces,omitempty"`

// SchedulerName specifies the scheduler to be used to dispath the Pod
// +optional
SchedulerName string `json:"schedulerName"`
}

// TaskRunSpecStatus defines the taskrun spec status the user can provide
Expand Down
1 change: 1 addition & 0 deletions pkg/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ func MakePod(images pipeline.Images, taskRun *v1alpha1.TaskRun, taskSpec v1alpha
ServiceAccountName: taskRun.Spec.ServiceAccountName,
Volumes: volumes,
NodeSelector: taskRun.Spec.PodTemplate.NodeSelector,
SchedulerName: taskRun.Spec.SchedulerName,
Tolerations: taskRun.Spec.PodTemplate.Tolerations,
Affinity: taskRun.Spec.PodTemplate.Affinity,
SecurityContext: taskRun.Spec.PodTemplate.SecurityContext,
Expand Down

0 comments on commit a911699

Please sign in to comment.