dongjoon-hyun commented on code in PR #48079:
URL: https://github.com/apache/spark/pull/48079#discussion_r1757280868
##########
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStepSuite.scala:
##########
@@ -131,6 +131,79 @@ class MountVolumesFeatureStepSuite extends SparkFunSuite {
assert(pvcClaim.getClaimName.endsWith("-driver-pvc-0"))
}
+ test("SPARK-49598: Create and mounts persistentVolumeClaims in driver with
labels") {
+ val volumeConf = KubernetesVolumeSpec(
+ "testVolume",
+ "/tmp",
+ "",
+ true,
+ KubernetesPVCVolumeConf(claimName =
MountVolumesFeatureStep.PVC_ON_DEMAND,
+ storageClass = Some("gp"),
+ size = Some("1Mi"),
+ labels = Some(Map("foo" -> "bar", "env" -> "test")))
+ )
+
+ val kubernetesConf = KubernetesTestConf.createDriverConf(volumes =
Seq(volumeConf))
+ val step = new MountVolumesFeatureStep(kubernetesConf)
+ val configuredPod = step.configurePod(SparkPod.initialPod())
+ assert(configuredPod.pod.getSpec.getVolumes.size() === 1)
+ val pvcClaim =
configuredPod.pod.getSpec.getVolumes.get(0).getPersistentVolumeClaim
+ assert(pvcClaim.getClaimName.endsWith("-driver-pvc-0"))
+ }
+
+ test("SPARK-49598: Create and mounts persistentVolumeClaims in executors
with labels") {
+ val volumeConf = KubernetesVolumeSpec(
+ "testVolume",
+ "/tmp",
+ "",
+ true,
+ KubernetesPVCVolumeConf(claimName =
MountVolumesFeatureStep.PVC_ON_DEMAND,
+ storageClass = Some("gp"),
Review Comment:
`gp` -> `gp3`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]