Skip to content

MountVolumesFeatureStep

MountVolumesFeatureStep is a KubernetesFeatureConfigStep.

Creating Instance

MountVolumesFeatureStep takes the following to be created:

MountVolumesFeatureStep is created when:

Configuring Driver Pod

configurePod(
  pod: SparkPod): SparkPod

configurePod is part of the KubernetesFeatureConfigStep abstraction.

configurePod constructs the volumes and volume mounts from the volumes (of the KubernetesConf) and creates a new SparkPod:

  • Adds the volumes to the pod specification

  • Adds the volume mounts to the container specification

constructVolumes

constructVolumes(
  volumeSpecs: Iterable[KubernetesVolumeSpec]): Iterable[(VolumeMount, Volume)]

constructVolumes creates Kubernetes VolumeMounts and Volumes based on the given KubernetesVolumeSpec specs.

VolumeMounts are built based on the following:

  • mountPath
  • mountReadOnly
  • mountSubPath
  • volumeName

Volumes are build based on the type of the volume:

  • HostPath
  • PersistentVolumeClaim
  • EmptyDir

In the end, Volumes and VolumeMounts are wired together using volumeName.


Last update: 2021-01-11