vanzin commented on a change in pull request #22904: [SPARK-25887][K8S] 
Configurable K8S context support
URL: https://github.com/apache/spark/pull/22904#discussion_r243078889
 
 

 ##########
 File path: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/SparkKubernetesClientFactory.scala
 ##########
 @@ -67,8 +66,17 @@ private[spark] object SparkKubernetesClientFactory {
     val dispatcher = new Dispatcher(
       ThreadUtils.newDaemonCachedThreadPool("kubernetes-dispatcher"))
 
-    // TODO [SPARK-25887] Create builder in a way that respects configurable 
context
-    val config = new ConfigBuilder()
+    // Allow for specifying a context used to auto-configure from the users 
K8S config file
+    val kubeContext = sparkConf.get(KUBERNETES_CONTEXT).filter(_.nonEmpty)
+    logInfo(s"Auto-configuring K8S client using " +
+      s"${if (kubeContext.isDefined) s"context ${kubeContext.getOrElse("?")}"
 
 Review comment:
   See previous feedback about using map + getOrElse.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to