Skip to content

Commit

Permalink
Fix: should not add emptyDir sizeLimit conf on executor pods if it is…
Browse files Browse the repository at this point in the history
… nil (#2316)

Signed-off-by: Cian Gallagher <cian@ciangallagher.net>
  • Loading branch information
Cian911 authored Nov 11, 2024
1 parent 72107fd commit 2999546
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions internal/controller/sparkapplication/submission.go
Original file line number Diff line number Diff line change
Expand Up @@ -840,20 +840,22 @@ func executorVolumeMountsOption(app *v1beta2.SparkApplication) ([]string, error)
}
switch volumeType {
case common.VolumeTypeEmptyDir:
args = append(
args,
"--conf",
fmt.Sprintf(
"%s=%s",
if volume.EmptyDir.SizeLimit != nil {
args = append(
args,
"--conf",
fmt.Sprintf(
common.SparkKubernetesExecutorVolumesOptionsTemplate,
common.VolumeTypeEmptyDir,
volume.Name,
"sizeLimit",
"%s=%s",
fmt.Sprintf(
common.SparkKubernetesExecutorVolumesOptionsTemplate,
common.VolumeTypeEmptyDir,
volume.Name,
"sizeLimit",
),
volume.EmptyDir.SizeLimit.String(),
),
volume.EmptyDir.SizeLimit.String(),
),
)
)
}
case common.VolumeTypeHostPath:
args = append(
args,
Expand Down

0 comments on commit 2999546

Please sign in to comment.