Yikun commented on a change in pull request #34599:
URL: https://github.com/apache/spark/pull/34599#discussion_r771070783
##########
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:
Sure, how about:
```scala
logError("Please check \"kubectl auth can-i create [resource]\" first." +
" It should be yes. And please also check your feature step
implementation.")
```
--
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]