Support nodeSelector in spark-submit pod (#1250)
This commit is contained in:
parent
6f35a11526
commit
0ac8b878d6
|
@ -130,6 +130,10 @@ func (sjm *realSubmissionJobManager) createSubmissionJob(app *v1beta2.SparkAppli
|
|||
if app.Spec.ServiceAccount != nil {
|
||||
job.Spec.Template.Spec.ServiceAccountName = *app.Spec.ServiceAccount
|
||||
}
|
||||
|
||||
if len(app.Spec.NodeSelector) > 0 {
|
||||
job.Spec.Template.Spec.NodeSelector = app.Spec.NodeSelector
|
||||
}
|
||||
// Copy the labels on the SparkApplication to the Job.
|
||||
for key, val := range app.Labels {
|
||||
job.Labels[key] = val
|
||||
|
|
Loading…
Reference in New Issue