EnricoMi commented on code in PR #45728:
URL: https://github.com/apache/spark/pull/45728#discussion_r1865932182
##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStep.scala:
##########
@@ -82,8 +82,15 @@ private[spark] class BasicDriverFeatureStep(conf:
KubernetesDriverConf)
private val driverMemoryWithOverheadMiB = driverMemoryMiB + memoryOverheadMiB
override def configurePod(pod: SparkPod): SparkPod = {
+ val driverAttributes = conf.get(UI.CUSTOM_DRIVER_LOG_URL).map { _ =>
+ Map(
+ ENV_DRIVER_ATTRIBUTE_APP_ID -> conf.appId,
+ ENV_DRIVER_ATTRIBUTE_KUBERNETES_NAMESPACE ->
conf.get(KUBERNETES_NAMESPACE),
+ ENV_DRIVER_ATTRIBUTE_KUBERNETES_POD_NAME -> driverPodName
+ )
+ }.getOrElse(Map.empty[String, String])
val driverCustomEnvs = KubernetesUtils.buildEnvVars(
- Seq(ENV_APPLICATION_ID -> conf.appId) ++ conf.environment)
+ Seq(ENV_APPLICATION_ID -> conf.appId) ++ conf.environment ++
driverAttributes)
Review Comment:
This is the same pattern as in
https://github.com/apache/spark/blob/584b6dbfc99f466f32d5e3341ee19f129fae1090/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/BasicExecutorFeatureStep.scala#L146-L173
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]