MountVolumesFeatureStep¶
MountVolumesFeatureStep
is a KubernetesFeatureConfigStep.
Creating Instance¶
MountVolumesFeatureStep
takes the following to be created:
MountVolumesFeatureStep
is created when:
KubernetesDriverBuilder
is requested to build a driver pod specKubernetesExecutorBuilder
is requested to build an executor pod spec
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 VolumeMount
s and Volume
s based on the given KubernetesVolumeSpec
specs.
VolumeMount
s are built based on the following:
mountPath
mountReadOnly
mountSubPath
volumeName
Volume
s are build based on the type of the volume:
HostPath
PersistentVolumeClaim
EmptyDir
In the end, Volume
s and VolumeMount
s are wired together using volumeName
.
Last update: 2021-01-11