Github user mccheah commented on a diff in the pull request:
https://github.com/apache/spark/pull/22146#discussion_r211799242
--- Diff:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesUtils.scala
---
@@ -59,5 +65,23 @@ private[spark] object KubernetesUtils {
}
}
+ def loadPodFromTemplate(kubernetesClient: KubernetesClient,
+ templateFile: File,
+ containerName: String): SparkPod = {
+ try {
+ val pod = kubernetesClient.pods().load(templateFile).get()
+ val container = pod.getSpec.getContainers.asScala
+ .filter(_.getName == containerName)
--- End diff --
Can use `require(...exists)`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]