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

    https://github.com/apache/spark/pull/19954#discussion_r157885683
  
    --- Diff: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/DriverConfigOrchestrator.scala
 ---
    @@ -116,10 +127,45 @@ private[spark] class 
DriverConfigurationStepsOrchestrator(
           None
         }
     
    +    val mayBeInitContainerBootstrapStep =
    +      if (areAnyFilesNonContainerLocal(sparkJars ++ sparkFiles)) {
    +        val orchestrator = new InitContainerConfigOrchestrator(
    +          sparkJars,
    +          sparkFiles,
    +          jarsDownloadPath,
    +          filesDownloadPath,
    +          imagePullPolicy,
    +          initContainerConfigMapName,
    +          INIT_CONTAINER_PROPERTIES_FILE_NAME,
    +          sparkConf)
    +        val bootstrapStep = new DriverInitContainerBootstrapStep(
    +          orchestrator.getAllConfigurationSteps,
    +          initContainerConfigMapName,
    +          INIT_CONTAINER_PROPERTIES_FILE_NAME)
    +
    +        Some(bootstrapStep)
    +      } else {
    +        None
    +      }
    +
    +    val mayBeMountSecretsStep = if (secretNamesToMountPaths.nonEmpty) {
    --- End diff --
    
    ```
    val mountSecretsSteps = if (...) Seq(...) else Nil
    ```
    
    You could probably use the same logic above too for the init container. 
Using an option here is not really doing anything useful.


---

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

Reply via email to