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 Feb 13, 2020
1 parent 1266b4a commit 1bc05ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/apis/pipeline/pod/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ type Template struct {
// default.
// +optional
PriorityClassName *string `json:"priorityClassName,omitempty" protobuf:"bytes,7,opt,name=priorityClassName"`
// SchedulerName specifies the scheduler to be used to dispatch the Pod
// +optional
SchedulerName string `json:"schedulerName"`
}

func (tpl *Template) Equals(other *Template) bool {
Expand Down
1 change: 1 addition & 0 deletions pkg/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ func MakePod(images pipeline.Images, taskRun *v1alpha1.TaskRun, taskSpec v1alpha
SecurityContext: podTemplate.SecurityContext,
RuntimeClassName: podTemplate.RuntimeClassName,
AutomountServiceAccountToken: podTemplate.AutomountServiceAccountToken,
SchedulerName: podTemplate.SchedulerName,
DNSPolicy: dnsPolicy,
DNSConfig: podTemplate.DNSConfig,
EnableServiceLinks: podTemplate.EnableServiceLinks,
Expand Down

0 comments on commit 1bc05ba

Please sign in to comment.