Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19954#discussion_r157914870
  
    --- 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've already made a ton of suggestions. I'm not asking you to modify this 
PR, I'm pointing out places where having a proper abstraction would clean up 
the code.
    
    e.g. this is the place where calling a common "prepare this container" code 
taking a custom orchestrator for executors would help.
    
    Otherwise, if tomorrow you need to add another step before starting driver 
and executors, you'll need another hack like "bootstraps" because they don't 
share the concept of an orchestrator that runs config steps.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to