Uh oh!
There was an error while loading. Please reload this page.
[SPARK-23529][K8s] Support mounting volumes - #21260
Conversation
foxish
commented
May 8, 2018
jenkins, ok to test |
SparkQA
commented
May 8, 2018
Test build #90363 has finished for PR 21260 at commit
|
SparkQA
commented
May 8, 2018
Kubernetes integration test starting |
SparkQA
commented
May 8, 2018
Kubernetes integration test status success |
liyinan926
commented
May 9, 2018
This is indeed concerning, given that we don't yet support a lot of pod customization options yet, e.g., affinity and anti-affinity, security context, etc. Ideally, pod specs should be specified declaratively like in Deployment and StatefulSet, but Spark is configuration property based. The Spark Operator attempted to address this using initializers. But initializers are alpha and dangerous. Admission webhooks are an option, but again, they pose risks. |
liyinan926
commented
May 11, 2018
andrusha
commented
May 14, 2018
@liyinan926 sounds fair, it also pending tests, I'll add those in todo list for this PR and ping you once its done |
er0sin
commented
May 15, 2018
How does one configure a PV/PVC with this change? |
liyinan926
commented
May 15, 2018
@er0sin PVCs can be mounted similarly to the example below: |
SparkQA
commented
May 22, 2018
Test build #90956 has finished for PR 21260 at commit
|
SparkQA
commented
May 22, 2018
Kubernetes integration test starting |
SparkQA
commented
May 22, 2018
Kubernetes integration test status success |
andrusha
commented
May 22, 2018
@liyinan926 now Would appreciate feedback on documentation, as we have to make clear which features are supported. Following refactorings might be done:
|
SparkQA
commented
May 22, 2018
Test build #90960 has finished for PR 21260 at commit
|
andrusha
commented
May 22, 2018
@AmplabJenkins failed due to github flakiness. Please retest. |
SparkQA
commented
May 22, 2018
Test build #90962 has finished for PR 21260 at commit
|
liyinan926
commented
May 22, 2018
@andrusha Is this ready for review? |
andrusha
commented
May 24, 2018
@liyinan926 yeap, ready for review. If you think it makes sense to make refactors I'm speaking of then I can add those too. |
SparkQA
commented
May 24, 2018
Test build #91112 has finished for PR 21260 at commit
|
f87bf3f to
f218d8aCompareSparkQA
commented
May 24, 2018
Test build #91114 has finished for PR 21260 at commit
|
SparkQA
commented
May 24, 2018
Kubernetes integration test starting |
SparkQA
commented
May 24, 2018
Kubernetes integration test status success |
SparkQA
commented
Jun 13, 2018
Kubernetes integration test starting |
SparkQA
commented
Jun 13, 2018
Kubernetes integration test status success |
SparkQA
commented
Jun 13, 2018
Test build #91775 has finished for PR 21260 at commit
|
SparkQA
commented
Jun 15, 2018
Kubernetes integration test starting |
SparkQA
commented
Jun 15, 2018
Test build #91904 has finished for PR 21260 at commit
|
SparkQA
commented
Jun 15, 2018
Kubernetes integration test status failure |
andrusha
commented
Jun 18, 2018
retest please |
felixcheung
commented
Jun 26, 2018
Jenkins, retest this please |
SparkQA
commented
Jun 26, 2018
Test build #92346 has finished for PR 21260 at commit
|
SparkQA
commented
Jul 3, 2018
Test build #92560 has finished for PR 21260 at commit
|
liyinan926
commented
Jul 6, 2018
@felixcheung@mccheah Can you take a look and merge this? |
skonto
commented
Jul 6, 2018
@felixcheung gentle ping, this is pretty useful. |
Will review today. |
baluchicken
commented
Jul 7, 2018
Nice work, only one thing I would consider including a StorageClass name option for the PersistentVolumeClaim volume type which defaults to an empty string. Without that the PVC will always use the default StorageClass which may not exists in all scenarios. Thus the pod will remain in pending state indefinitely. |
@skonto is it better to generalize the approach to match the one in https://issues.apache.org/jira/browse/SPARK-24434? not sure if @mccheah@foxish@erikerlandson have any last thought |
liyinan926
commented
Jul 8, 2018
@felixcheung This feature was discussed and this PR was started before https://issues.apache.org/jira/browse/SPARK-24434 was even brought up. Being able to mount commonly used types of volumes seems super useful for some users, so it might make sense to accept it while https://issues.apache.org/jira/browse/SPARK-24434 is still going through design review. |
felixcheung
commented
Jul 9, 2018
ok that makes sense. could we get some clear guidance in SPARK-24434 on how to decide what should be a conf and what should be in an external template file? |
felixcheung
left a comment
There was a problem hiding this comment.
LGTM, would be great to add a complete example in running-on-kubernetes.md as a follow up
(will wait for 24hr, then merge)
liyinan926
commented
Jul 9, 2018
We talked about stop accepting any new config options for customizing the driver/executor pods. Moving forward, all new customization needs will be fulfilled by the solution to SPARK-24434. |
felixcheung
commented
Jul 11, 2018
merged to master |
@felixcheung volumes will be supported by the pod template and so you will be able to do it without the conf options defined here. If both spark conf and template properties exist we have defined a precedence order in the design doc. |
### What changes were proposed in this pull request? This PR promotes `KubernetesVolumeUtils` to `Stable` for Apache Spark 4.2.0. ### Why are the changes needed? `KubernetesVolumeUtils` was added at Apache Spark 2.4.0 and the last API signiture change happens at Apache Spark 3.0.0. It has been maintained stable and was promoted to `DeveloperAPI` at 4.0.0. - #21260 - #22959 - #46326 We had better promote this to next step as `Stable` API. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7) Closes#55514 from dongjoon-hyun/SPARK-56602. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
This PR continues #21095 and intersects with #21238. I've added volume mounts as a separate step and added PersistantVolumeClaim support.
There is a fundamental problem with how we pass the options through spark conf to fabric8. For each volume type and all possible volume options we would have to implement some custom code to map config values to fabric8 calls. This will result in big body of code we would have to support and means that Spark will always be somehow out of sync with k8s.
I think there needs to be a discussion on how to proceed correctly (eg use PodPreset instead)
Due to the complications of provisioning and managing actual resources this PR addresses only volume mounting of already present resources.