Skip to content

Commit

Permalink
Add SchedulerName to PodTemplate
Browse files Browse the repository at this point in the history
Set scheduler in PodTemplate to execute Tasks with specific schedulers.
  • Loading branch information
waveywaves committed Jan 14, 2020
1 parent fe94a0f commit 42ed72f
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/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,8 @@ type PodTemplate struct {
// default.
// +optional
PriorityClassName *string `json:"priorityClassName,omitempty" protobuf:"bytes,7,opt,name=priorityClassName"`

// SchedulerName specifies the scheduler to be used to dispath the Pod
//+optional
SchedulerName string `json:"schedulerName"`
}
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.PodTemplate.SchedulerName,
Tolerations: taskRun.Spec.PodTemplate.Tolerations,
Affinity: taskRun.Spec.PodTemplate.Affinity,
SecurityContext: taskRun.Spec.PodTemplate.SecurityContext,
Expand Down

0 comments on commit 42ed72f

Please sign in to comment.