Skip to content

Conversation

@ruanwenjun
Copy link
Member

@ruanwenjun ruanwenjun commented Dec 3, 2025

What changes were proposed in this pull request?

Add a new configuration option spark.kubernetes.scheduler.volcano.podGroupTemplateJson for cases where Volcano is used as the Kubernetes scheduler.
This option allows users to provide the PodGroup configuration directly as a JSON string.
If podGroupTemplateFile is not specified, Spark will fall back to using podGroupTemplateJson.

Why are the changes needed?

  • Avoid creating temporary podgroup files to facilitate usage and integration with external platforms such as kyuubi.

Does this PR introduce any user-facing change?

Yes.

Use below conf can work

--conf spark.kubernetes.driver.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep \
--conf spark.kubernetes.executor.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep \
--conf spark.kubernetes.scheduler.name=volcano \
--conf spark.kubernetes.scheduler.volcano.podGroupTemplateJson={"spec": {"minMember": 1,"minResources": {"cpu": "2","memory": "3Gi"},"queue": "bigdata"}} \

The podgroup has been created correctly

Name:         spark-40cd4561661d4298a3f08cc7477cdc3c-podgroup
Namespace:    spark
API Version:  scheduling.volcano.sh/v1beta1
Kind:         PodGroup
Metadata:
  Creation Timestamp:  2025-12-05T09:18:35Z
  Generation:          7
  Owner References:
    API Version:     v1
    Controller:      true
    Kind:            Pod
    Name:            kyuubi-cql-test-ds-35faf46f-c4f9-44d3-8288-d1875e8a074d-driver
    UID:             8fd2d875-9c17-4bf2-8787-fdd4f9e2e79b
  Resource Version:  2230406043
  UID:               adaeb0a8-c6f6-4c29-92e8-480d8e01d89a
Spec:
  Min Member:  1
  Min Resources:
    Cpu:     2
    Memory:  3Gi
  Queue:     bigdata

How was this patch tested?

  • Test by UT

Was this patch authored or co-authored using generative AI tooling?

NO

@ruanwenjun ruanwenjun marked this pull request as draft December 3, 2025 12:13
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_supportpodGroupTemplateJson branch 3 times, most recently from 94aca75 to 034de0e Compare December 4, 2025 03:25
@ruanwenjun ruanwenjun marked this pull request as ready for review December 4, 2025 05:39
@ruanwenjun ruanwenjun changed the title [WIP][SPARK-54553][VOLCANO] Supports receiving podgroup JSON format configurations when using Volcano. [SPARK-54553][VOLCANO] Supports receiving podgroup JSON format configurations when using Volcano. Dec 4, 2025
@ruanwenjun ruanwenjun marked this pull request as draft December 4, 2025 10:04
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_supportpodGroupTemplateJson branch from 034de0e to 61369d5 Compare December 4, 2025 10:49
@ruanwenjun ruanwenjun marked this pull request as ready for review December 4, 2025 11:01
@ruanwenjun ruanwenjun marked this pull request as draft December 4, 2025 11:41
@ruanwenjun ruanwenjun changed the title [SPARK-54553][VOLCANO] Supports receiving podgroup JSON format configurations when using Volcano. [WIP][SPARK-54553][VOLCANO] Supports receiving podgroup JSON format configurations when using Volcano. Dec 4, 2025
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_supportpodGroupTemplateJson branch 3 times, most recently from 2b625d3 to a3ae7f6 Compare December 5, 2025 09:21
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_supportpodGroupTemplateJson branch from a3ae7f6 to e35be2b Compare December 5, 2025 11:28
@ruanwenjun ruanwenjun marked this pull request as ready for review December 5, 2025 12:44
@ruanwenjun ruanwenjun changed the title [WIP][SPARK-54553][VOLCANO] Supports receiving podgroup JSON format configurations when using Volcano. [SPARK-54553][VOLCANO] Supports receiving podgroup JSON format configurations when using Volcano. Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant