You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by mccheah <gi...@git.apache.org> on 2018/11/01 17:29:13 UTC
[GitHub] spark pull request #22904: [SPARK-25887][K8S] Configurable K8S context suppo...
Github user mccheah commented on a diff in the pull request:
https://github.com/apache/spark/pull/22904#discussion_r230127363
--- Diff: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala ---
@@ -23,6 +23,18 @@ import org.apache.spark.internal.config.ConfigBuilder
private[spark] object Config extends Logging {
+ val KUBERNETES_CONTEXT =
+ ConfigBuilder("spark.kubernetes.context")
+ .doc("The desired context from your K8S config file used to configure the K8S " +
+ "client for interacting with the cluster. Useful if your config file has " +
+ "multiple clusters or user identities defined. The client library used " +
+ "locates the config file via the KUBECONFIG environment variable or by defaulting " +
+ "to .kube/config under your home directory. If not specified then your current " +
+ "context is used. You can always override specific aspects of the config file " +
+ "provided configuration using other Spark on K8S configuration options.")
+ .stringConf
+ .createWithDefault(null)
--- End diff --
Default of `null` seems strange, surely we can make this `Optional` and just handle `empty` in the places that use this?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org