Github user mccheah commented on a diff in the pull request:
https://github.com/apache/spark/pull/22146#discussion_r211800379
--- Diff:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesDriverBuilder.scala
---
@@ -96,3 +112,25 @@ private[spark] class KubernetesDriverBuilder(
spec
}
}
+
+private[spark] object KubernetesDriverBuilder extends Logging {
+ def apply(kubernetesClient: KubernetesClient, conf: SparkConf):
KubernetesDriverBuilder = {
+ conf.get(Config.KUBERNETES_DRIVER_PODTEMPLATE_FILE)
+ .map(new File(_))
+ .map(file => new KubernetesDriverBuilder(provideInitialSpec = conf
=> {
+ try {
+ val sparkPod = KubernetesUtils.loadPodFromTemplate(
+ kubernetesClient,
+ file,
+ Constants.DRIVER_CONTAINER_NAME)
--- End diff --
You may `import org.apache.spark.deploy.k8s.Constants._` at the top of the
file and then not need the `Constants` prefix here.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]