GitHub user liyinan926 opened a pull request:

    https://github.com/apache/spark/pull/20148

    [SPARK-22953][K8S] Avoids adding duplicated secret volumes when 
init-container is used

    ## What changes were proposed in this pull request?
    
    User-specified secrets are mounted into both the main container and 
init-container (when it is used) in a Spark driver/executor pod, using the 
`MountSecretsBootstrap`. Because `MountSecretsBootstrap` always adds new secret 
volumes for the secrets to the pod, the same secret volumes get added twice, 
one when mounting the secrets to the main container, and the other when 
mounting the secrets to the init-container. This PR fixes the issue by 
introducing a boolean flag to `MountSecretsBootstrap.mountSecrets` that tells 
whether to add new secret volumes. The flag is set to `true` when mounting 
secrets to the main container and `false` when mounting to the init-container.
    
    Ref: https://github.com/apache-spark-on-k8s/spark/issues/594. 
    
    ## How was this patch tested?
    Unit tested.
    
    @vanzin @jiangxb1987 @ueshin This is to fix a critical bug in 2.3. PTAL. 
Thanks!
    @hex108 @foxish @kimoonkim
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/liyinan926/spark-k8s branch-2.3

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/20148.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20148
    
----
commit 9be26a857164e815594941adff6a8d2001d69001
Author: Yinan Li <liyinan926@...>
Date:   2018-01-04T06:20:01Z

    [SPARK-22953][K8S] Avoids adding duplicated secret volumes when 
init-container is used

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to