dongjoon-hyun commented on a change in pull request #34599:
URL: https://github.com/apache/spark/pull/34599#discussion_r770779268
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala
##########
@@ -133,15 +133,39 @@ private[spark] class Client(
.build()
val driverPodName = resolvedDriverPod.getMetadata.getName
+ // setup resources before pod creation
+ val preKubernetesResources =
resolvedDriverSpec.driverPreKubernetesResources
+ try {
+ kubernetesClient.resourceList(preKubernetesResources:
_*).createOrReplace()
+ } catch {
+ case NonFatal(e) =>
+ kubernetesClient.resourceList(preKubernetesResources: _*).delete()
Review comment:
Since this is the first error causing Job failure, could you add a
user-friendly error message ?
--
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]