ScrapCodes commented on a change in pull request #27520: [SPARK-30771][K8S]
Avoid failed mount warning from kubernetes and support the optional mount.
URL: https://github.com/apache/spark/pull/27520#discussion_r377536379
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala
##########
@@ -127,15 +127,18 @@ private[spark] class Client(
.pods()
.withName(driverPodName)
.watch(watcher)) { _ =>
- val createdDriverPod = kubernetesClient.pods().create(resolvedDriverPod)
+ var createdDriverPod: Option[Pod] = None
try {
val otherKubernetesResources =
resolvedDriverSpec.driverKubernetesResources ++ Seq(configMap)
- addDriverOwnerReference(createdDriverPod, otherKubernetesResources)
kubernetesClient.resourceList(otherKubernetesResources:
_*).createOrReplace()
+ createdDriverPod =
Some(kubernetesClient.pods().create(resolvedDriverPod))
+ addDriverOwnerReference(createdDriverPod.get, otherKubernetesResources)
Review comment:
Hi Yinan Li, thanks a lot for taking the look here. You are right here. But,
I was wondering, can I do something to fix it. For example, if I do not create
the driver pod before creating resources, the owner reference is not properly
set up and if I do the other way, optional mount does not work(this issue).
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]