Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/19954#discussion_r157913710
--- Diff:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodFactory.scala
---
@@ -209,9 +213,33 @@ private[spark] class ExecutorPodFactoryImpl(sparkConf:
SparkConf)
.build()
}.getOrElse(executorContainer)
- new PodBuilder(executorPod)
+ val (maybeSecretsMountedPod, maybeSecretsMountedContainer) =
+ mountSecretsBootstrap.map { bootstrap =>
+ bootstrap.mountSecrets(executorPod, containerWithLimitCores)
--- End diff --
I'm not saying that they should be doing the same work, I'm saying that
because they are not using the same abstraction, you can't use the same
existing concepts here. You had to create the concept of a "bootstrap" to reuse
code between the "driver orchestrator" and this code (the "executor
orchestrator"), and kinda shoerhorn it into the whole thing so that you could
share a little bit of code.
Whereas if both could reuse steps (like "initialize this init container"),
you probably could avoid that altogether.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]