dongjoon-hyun commented on a change in pull request #27735:
URL: https://github.com/apache/spark/pull/27735#discussion_r523272617
##########
File path:
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/submit/ClientSuite.scala
##########
@@ -66,21 +73,30 @@ class ClientSuite extends SparkFunSuite with BeforeAndAfter
{
.withValue(SPARK_CONF_DIR_INTERNAL)
.endEnv()
.addNewVolumeMount()
- .withName(SPARK_CONF_VOLUME)
+ .withName(SPARK_CONF_VOLUME_DRIVER)
.withMountPath(SPARK_CONF_DIR_INTERNAL)
.endVolumeMount()
.build()
- private val FULL_EXPECTED_POD = new PodBuilder(BUILT_DRIVER_POD)
+
+ private val KEY_TO_PATH =
+ new KeyToPath(SPARK_CONF_FILE_NAME, 420, SPARK_CONF_FILE_NAME)
+
+ private def fullExpectedPod(keyToPaths: List[KeyToPath] = List(KEY_TO_PATH))
=
+ new PodBuilder(BUILT_DRIVER_POD)
.editSpec()
.addToContainers(FULL_EXPECTED_CONTAINER)
.addNewVolume()
- .withName(SPARK_CONF_VOLUME)
-
.withNewConfigMap().withName(s"$KUBERNETES_RESOURCE_PREFIX-driver-conf-map").endConfigMap()
+ .withName(SPARK_CONF_VOLUME_DRIVER)
+ .withNewConfigMap()
+ .withItems(keyToPaths.asJava)
+ .withName(KubernetesClientUtils.configMapNameDriver)
+ .endConfigMap()
.endVolume()
.endSpec()
.build()
- private val POD_WITH_OWNER_REFERENCE = new PodBuilder(FULL_EXPECTED_POD)
+ private def podWithOwnerReference(keyToPaths: List[KeyToPath] =
List(KEY_TO_PATH)) =
+ new PodBuilder(fullExpectedPod(keyToPaths))
Review comment:
nit. Indentation?
----------------------------------------------------------------
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]