Skip to content

Commit

Permalink
[FIX] tolerations are not directly present in Driver(/Executor)Spec (#…
Browse files Browse the repository at this point in the history
…1365)

Tolerations are not part of DriverSpec or ExecutorSpec object. Instead they should be carried from SparkPodSpec field inside these objects
  • Loading branch information
s-pedamallu authored Oct 21, 2021
1 parent b5b0964 commit a2e7461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webhook/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,9 @@ func addAffinity(pod *corev1.Pod, app *v1beta2.SparkApplication) *patchOperation
func addTolerations(pod *corev1.Pod, app *v1beta2.SparkApplication) []patchOperation {
var tolerations []corev1.Toleration
if util.IsDriverPod(pod) {
tolerations = app.Spec.Driver.Tolerations
tolerations = app.Spec.Driver.SparkPodSpec.Tolerations
} else if util.IsExecutorPod(pod) {
tolerations = app.Spec.Executor.Tolerations
tolerations = app.Spec.Executor.SparkPodSpec.Tolerations
}

first := false
Expand Down

0 comments on commit a2e7461

Please sign in to comment.