dbtsai commented on a change in pull request #29873:
URL: https://github.com/apache/spark/pull/29873#discussion_r495337096
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala
##########
@@ -66,32 +66,30 @@ private[spark] class MountVolumesFeatureStep(conf:
KubernetesConf)
case KubernetesPVCVolumeConf(claimNameTemplate, storageClass, size) =>
val claimName = conf match {
case c: KubernetesExecutorConf =>
- val claimName = claimNameTemplate
+ claimNameTemplate
.replaceAll(PVC_ON_DEMAND,
s"${conf.resourceNamePrefix}-exec-${c.executorId}$PVC_POSTFIX-$i")
.replaceAll(ENV_EXECUTOR_ID, c.executorId)
-
- if (storageClass.isDefined && size.isDefined) {
- additionalResources.append(new PersistentVolumeClaimBuilder()
- .withKind(PVC)
- .withApiVersion("v1")
- .withNewMetadata()
- .withName(claimName)
- .endMetadata()
- .withNewSpec()
- .withStorageClassName(storageClass.get)
- .withAccessModes(PVC_ACCESS_MODE)
- .withResources(new ResourceRequirementsBuilder()
- .withRequests(Map("storage" -> new
Quantity(size.get)).asJava).build())
- .endSpec()
- .build())
- }
-
- claimName
-
case _ =>
Review comment:
Late to review. Should we match `KubernetesDriverConf` and add anther
default case?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]