-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support driver and executor pod use different priority #2146
Conversation
Signed-off-by: Kevin Wu <kevin.wu@momenta.ai>
@agemooij @mhausenblas @ChenYi015 Pls help make a review, thank you |
/assign @vara-bonthu @jacobsalway @yuchaoran2011 |
func addPriorityClassName(pod *corev1.Pod, app *v1beta2.SparkApplication) error { | ||
if *app.Spec.BatchSchedulerOptions.PriorityClassSplitting { | ||
return addDriverExecutorSelfPriorityClassName(pod, app) | ||
} else { | ||
return addDriverExecutorUnifyPriorityClassName(pod, app) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding, the priorityClassName
in batchSchedulerOptions
is utilized by Volcano's PodGroup, and it is unrelated to the priorityClass of Spark pods. Given this, it seems unnecessary to have the prioryClassSplitting
option or the addDriverExecutorUnifyPriorityClassName
function. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,prioryClassSplitting
batchSchedulerOptions
may be a bit inappropriate, let me clarify my usage scenario
The current business scenario has not yet used the ability of podGroup
. The underlying K8s cluster is divided into multiple resource pools, and the SparkApplication task itself is defined with different priorities at the business level. Moreover, the resources of the underlying K8s cluster are limited. At this time, it is expected that high-priority executors can run first when resources are insufficient, so the PriorityClass priority preemption scheduling mechanism of K8s itself is used
But because the default PriorityClass
of SparkApplication
is in the batchSchedulerOptions
, it means that the driver and executor
under the same SparkApplication
will be set to the same priority; but in the actual business scenario, there may be problems, such as we know that the driver is the controller of the executor, once the drvier
node is preempted
and expelled, the entire SparkApplication
will fail, and the expected effect of the business is that the driver
pod cannot be preempted
with high priority, and the executor
can be preempted
with high priority, so that different priorities must be set for the driver and executor
, such as setting the highest priority for the driver
, and the executor can have a low priority, so that after the low-priority executor
is expelled, it will wait for high priority After the level executor
is executed and there are free resources, the executors
of these previously expelled low-priority tasks will be created by the corresponding drvier pod
If this is the case, how should this priority be defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kevinz857 Perhaps we can do as follows:
- If
spec.batchSchedulerOptions.priorityClassName
is defined, it will automatically be propagated to both driver and executor pods by default, as this is the current behavior so that we will not make a breaking change. - Furthermore, if either
spec.driver.priorityClassName
orspec.executor.priorityClassName
is specifically defined, it should take precedence overspec.batchSchedulerOptions.priorityClassName
. In this way, we can eliminate the need to introducespec.batchSchedulerOptions.prioryClassSplitting
option as it is somewhat confusing. Also, users can define different priority classes for driver and executor pods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChenYi015 Very good suggestion, I can modify the code and resubmit MR according to this proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChenYi015 According to the latest proposal, if if either spec.driver.priorityClassName or spec.executor.priorityClassName is specifically defined, it should take precedence over spec.batchSchedulerOptions.priorityClassName.
Modified the code according to this proposal, please help review it when you have time, thanks
…iorityClassName specifically defined, then can precedence over spec.batchSchedulerOptions.priorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai>
func setPodPriorityClassName(pod *corev1.Pod, priorityClassName *string) { | ||
if priorityClassName != nil && *priorityClassName != "" { | ||
pod.Spec.PriorityClassName = *priorityClassName | ||
pod.Spec.Priority = nil | ||
pod.Spec.PreemptionPolicy = nil | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could merge the logic of setPodPriorityClassName
into addPriorityClassName
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChenYi015 Already adapted merge the logic of setPodPriorityClassName into addPriorityClassName, thanks for ur suggestions
…sName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai>
@Kevinz857 Thanks for the contribution. LGTM. Will wait for another approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave a better comment tomorrow on what the logic could look like, but just noting that unit tests aren't passing for me locally because of a nil pointer dereference on the app.Spec.{Driver|Executor}.PriorityClassName
@jacobsalway Thanks for the prompt, the judgment of whether the pointer is nil has been added. Looking forward to better revision suggestions tomorrow |
Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai>
…iorityClassName specifically defined, then can precedence over spec.batchSchedulerOptions.priorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai>
…sName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai>
Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai>
@jacobsalway, please retake a look when you have time. |
@Kevinz857 The |
…lit driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai>
…lit driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai>
@ChenYi015 Removed the definition and reference of spec.batchSchedulerOptions priorityClassName, and unified the definition and use of priority by driver pod and executor pod. Pls have a look when u are free. Thanks a lot |
…lit driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai>
// Update pod group priorityClassName if it's specified in Spark Application | ||
if app.Spec.BatchSchedulerOptions.PriorityClassName != nil { | ||
podGroup.Spec.PriorityClassName = *app.Spec.BatchSchedulerOptions.PriorityClassName | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add it back.
if util.IsDriverPod(pod) && *app.Spec.Driver.PriorityClassName != "" { | ||
priorityClassName = app.Spec.Driver.PriorityClassName | ||
} else if util.IsExecutorPod(pod) && *app.Spec.Executor.PriorityClassName != "" { | ||
priorityClassName = app.Spec.Executor.PriorityClassName | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if util.IsDriverPod(pod) && *app.Spec.Driver.PriorityClassName != "" { | |
priorityClassName = app.Spec.Driver.PriorityClassName | |
} else if util.IsExecutorPod(pod) && *app.Spec.Executor.PriorityClassName != "" { | |
priorityClassName = app.Spec.Executor.PriorityClassName | |
} | |
if util.IsDriverPod(pod) { | |
priorityClassName = app.Spec.Driver.PriorityClassName | |
} else if util.IsExecutorPod(pod) { | |
priorityClassName = app.Spec.Executor.PriorityClassName | |
} |
This will simplify the code and avoid null pointer exception.
Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai>
Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @Kevinz857 🙌🏼
/approve
@jacobsalway I know you left some comments. Are you happy with the PR?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ChenYi015, vara-bonthu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Kevin Wu <kevin.wu@momenta.ai>
Signed-off-by: Kevin Wu <kevin.wu@momenta.ai>
/hold cancel |
…w#2146) * feat: support driver and executor pod use different priority Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: if *app.Spec.Driver.PriorityClassName and *app.Spec.Executor.PriorityClassName specifically defined, then can precedence over spec.batchSchedulerOptions.priorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: merge the logic of setPodPriorityClassName into addPriorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: support driver and executor pod use different priority Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: if *app.Spec.Driver.PriorityClassName and *app.Spec.Executor.PriorityClassName specifically defined, then can precedence over spec.batchSchedulerOptions.priorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: merge the logic of setPodPriorityClassName into addPriorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: add adjust pointer if is nil Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: remove spec.batchSchedulerOptions.priorityClassName define , split driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: remove spec.batchSchedulerOptions.priorityClassName define , split driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: Optimize code to avoid null pointer exceptions Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * fix: remove backup crd files Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * fix: remove BatchSchedulerOptions.PriorityClassName test code Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * fix: add driver and executor pod priorityClassName test code Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> --------- Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> Co-authored-by: Kevin Wu <kevin.wu@momenta.ai> (cherry picked from commit 6ae1b2f) Signed-off-by: Yi Chen <github@chenyicn.net>
* Support gang scheduling with Yunikorn (#2107) * Add Yunikorn scheduler and example Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Add test cases Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Add code comments Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Add license comment Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Inline mergeNodeSelector Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Fix initial number implementation Signed-off-by: Jacob Salway <jacob.salway@gmail.com> --------- Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit 8fcda12) Signed-off-by: Yi Chen <github@chenyicn.net> * Update Makefile for building sparkctl (#2119) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 4bc6e89) Signed-off-by: Yi Chen <github@chenyicn.net> * fix: Add default values for namespaces to match usage descriptions (#2128) * fix: Add default values for namespaces to match usage descriptions Signed-off-by: pengfei4.li <pengfei4.li@ly.com> * fix: remove incorrect cache settings Signed-off-by: pengfei4.li <pengfei4.li@ly.com> --------- Signed-off-by: pengfei4.li <pengfei4.li@ly.com> Co-authored-by: pengfei4.li <pengfei4.li@ly.com> (cherry picked from commit 52f818d) Signed-off-by: Yi Chen <github@chenyicn.net> * Fix: Spark role binding did not render properly when setting spark service account name (#2135) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit a1a38ea) Signed-off-by: Yi Chen <github@chenyicn.net> * Reintroduce option webhook.enable (#2142) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 9e88049) Signed-off-by: Yi Chen <github@chenyicn.net> * Add default batch scheduler argument (#2143) * Add default batch scheduler argument Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Add helm unit test Signed-off-by: Jacob Salway <jacob.salway@gmail.com> --------- Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit 9cc1c02) Signed-off-by: Yi Chen <github@chenyicn.net> * fix: unable to set controller/webhook replicas to zero (#2147) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 1afa72e) Signed-off-by: Yi Chen <github@chenyicn.net> * Adding support for setting spark job namespaces to all namespaces (#2123) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit c93b0ec) Signed-off-by: Yi Chen <github@chenyicn.net> * Support extended kube-scheduler as batch scheduler (#2136) * Support coscheduling with kube-scheduler plugins Signed-off-by: Yi Chen <github@chenyicn.net> * Add example for using kube-schulder coscheduling Signed-off-by: Yi Chen <github@chenyicn.net> --------- Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit e8d3de9) Signed-off-by: Yi Chen <github@chenyicn.net> * Run e2e tests on Kind (#2148) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit c810ece) Signed-off-by: Yi Chen <github@chenyicn.net> * Set schedulerName to Yunikorn (#2153) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit 62b4ca6) Signed-off-by: Yi Chen <github@chenyicn.net> * Create role and rolebinding for controller/webhook in every spark job namespace if not watching all namespaces (#2129) watching all namespaces Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 592b649) Signed-off-by: Yi Chen <github@chenyicn.net> * Fix: e2e test failes due to webhook not ready (#2149) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit dee91ba) Signed-off-by: Yi Chen <github@chenyicn.net> * Upgrade to Go 1.23.1 (#2155) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit 10fcb8e) Signed-off-by: Yi Chen <github@chenyicn.net> * Upgrade to Spark 3.5.2 (#2154) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit e1b7a27) Signed-off-by: Yi Chen <github@chenyicn.net> * Bump sigs.k8s.io/scheduler-plugins from 0.29.7 to 0.29.8 (#2159) Bumps [sigs.k8s.io/scheduler-plugins](https://github.com/kubernetes-sigs/scheduler-plugins) from 0.29.7 to 0.29.8. - [Release notes](https://github.com/kubernetes-sigs/scheduler-plugins/releases) - [Changelog](https://github.com/kubernetes-sigs/scheduler-plugins/blob/master/RELEASE.md) - [Commits](kubernetes-sigs/scheduler-plugins@v0.29.7...v0.29.8) --- updated-dependencies: - dependency-name: sigs.k8s.io/scheduler-plugins dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 95d202e) Signed-off-by: Yi Chen <github@chenyicn.net> * feat: support driver and executor pod use different priority (#2146) * feat: support driver and executor pod use different priority Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: if *app.Spec.Driver.PriorityClassName and *app.Spec.Executor.PriorityClassName specifically defined, then can precedence over spec.batchSchedulerOptions.priorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: merge the logic of setPodPriorityClassName into addPriorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: support driver and executor pod use different priority Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: if *app.Spec.Driver.PriorityClassName and *app.Spec.Executor.PriorityClassName specifically defined, then can precedence over spec.batchSchedulerOptions.priorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: merge the logic of setPodPriorityClassName into addPriorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: add adjust pointer if is nil Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: remove spec.batchSchedulerOptions.priorityClassName define , split driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: remove spec.batchSchedulerOptions.priorityClassName define , split driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: Optimize code to avoid null pointer exceptions Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * fix: remove backup crd files Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * fix: remove BatchSchedulerOptions.PriorityClassName test code Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * fix: add driver and executor pod priorityClassName test code Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> --------- Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> Co-authored-by: Kevin Wu <kevin.wu@momenta.ai> (cherry picked from commit 6ae1b2f) Signed-off-by: Yi Chen <github@chenyicn.net> * Bump gocloud.dev from 0.37.0 to 0.39.0 (#2160) Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.37.0 to 0.39.0. - [Release notes](https://github.com/google/go-cloud/releases) - [Commits](google/go-cloud@v0.37.0...v0.39.0) --- updated-dependencies: - dependency-name: gocloud.dev dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit e58023b) Signed-off-by: Yi Chen <github@chenyicn.net> * Update e2e tests (#2161) * Add sleep buffer to ensture the webhooks are ready before running the e2e tests Signed-off-by: Yi Chen <github@chenyicn.net> * Remove duplicate operator image build tasks Signed-off-by: Yi Chen <github@chenyicn.net> * Update e2e tests Signed-off-by: Yi Chen <github@chenyicn.net> * Update examples Signed-off-by: Yi Chen <github@chenyicn.net> --------- Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit e6a7805) Signed-off-by: Yi Chen <github@chenyicn.net> * fix: webhook not working when settings spark job namespaces to empty (#2163) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 7785107) Signed-off-by: Yi Chen <github@chenyicn.net> * fix: The logger had an odd number of arguments, making it panic (#2166) Signed-off-by: tcassaert <tcassaert@inuits.eu> (cherry picked from commit eb48b34) Signed-off-by: Yi Chen <github@chenyicn.net> * Upgrade to Spark 3.5.2(#2012) (#2157) * Upgrade to Spark 3.5.2 Signed-off-by: HyukSangCho <a01045542949@gmail.com> * Upgrade to Spark 3.5.2 Signed-off-by: HyukSangCho <a01045542949@gmail.com> * Upgrade to Spark 3.5.2 Signed-off-by: HyukSangCho <a01045542949@gmail.com> * Upgrade to Spark 3.5.2 Signed-off-by: HyukSangCho <a01045542949@gmail.com> --------- Signed-off-by: HyukSangCho <a01045542949@gmail.com> (cherry picked from commit 9f0c08a) Signed-off-by: Yi Chen <github@chenyicn.net> * Feature: Add pprof endpoint (#2164) * add pprof support to the operator Controller Manager Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> * add pprof support to helm chart Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> --------- Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> (cherry picked from commit 75b9266) Signed-off-by: Yi Chen <github@chenyicn.net> * fix the make kind-delete-custer to avoid accidental kubeconfig deletion (#2172) Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> (cherry picked from commit cbfefd5) Signed-off-by: Yi Chen <github@chenyicn.net> * Bump github.com/aws/aws-sdk-go-v2/config from 1.27.27 to 1.27.33 (#2174) Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.27 to 1.27.33. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@config/v1.27.27...config/v1.27.33) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit b818332) Signed-off-by: Yi Chen <github@chenyicn.net> * Bump helm.sh/helm/v3 from 3.15.3 to 3.16.1 (#2173) Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.15.3 to 3.16.1. - [Release notes](https://github.com/helm/helm/releases) - [Commits](helm/helm@v3.15.3...v3.16.1) --- updated-dependencies: - dependency-name: helm.sh/helm/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit f3f80d4) Signed-off-by: Yi Chen <github@chenyicn.net> * Add specific error in log line when failed to create web UI service (#2170) * Add specific error in log line when failed to create web UI service Signed-off-by: tcassaert <tcassaert@inuits.eu> * Update log to reflect correct resource that could not be created Co-authored-by: Yi Chen <github@chenyicn.net> Signed-off-by: tcassaert <tcassaert@protonmail.com> --------- Signed-off-by: tcassaert <tcassaert@inuits.eu> Signed-off-by: tcassaert <tcassaert@protonmail.com> Co-authored-by: Yi Chen <github@chenyicn.net> (cherry picked from commit ed3226e) Signed-off-by: Yi Chen <github@chenyicn.net> * Account for spark.executor.pyspark.memory in Yunikorn gang scheduling (#2178) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit a2f71c6) Signed-off-by: Yi Chen <github@chenyicn.net> * Fix: spark application does not respect time to live seconds (#2165) * Add time to live seconds example spark application Signed-off-by: Yi Chen <github@chenyicn.net> * fix: spark application does not respect time to live seconds Signed-off-by: Yi Chen <github@chenyicn.net> --------- Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit c855ee4) Signed-off-by: Yi Chen <github@chenyicn.net> * Update release workflow and docs (#2121) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit bca6aa8) Signed-off-by: Yi Chen <github@chenyicn.net> --------- Signed-off-by: Jacob Salway <jacob.salway@gmail.com> Signed-off-by: Yi Chen <github@chenyicn.net> Signed-off-by: pengfei4.li <pengfei4.li@ly.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> Signed-off-by: tcassaert <tcassaert@inuits.eu> Signed-off-by: HyukSangCho <a01045542949@gmail.com> Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> Signed-off-by: tcassaert <tcassaert@protonmail.com> Co-authored-by: Jacob Salway <jacob.salway@gmail.com> Co-authored-by: Neo <56439757+snappyyouth@users.noreply.github.com> Co-authored-by: pengfei4.li <pengfei4.li@ly.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevinz <ruoshuidba@gmail.com> Co-authored-by: Kevin Wu <kevin.wu@momenta.ai> Co-authored-by: tcassaert <tcassaert@protonmail.com> Co-authored-by: ha2hi <56156892+ha2hi@users.noreply.github.com> Co-authored-by: Sébastien Maintrot <3097030+ImpSy@users.noreply.github.com>
* Support gang scheduling with Yunikorn (kubeflow#2107) * Add Yunikorn scheduler and example Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Add test cases Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Add code comments Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Add license comment Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Inline mergeNodeSelector Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Fix initial number implementation Signed-off-by: Jacob Salway <jacob.salway@gmail.com> --------- Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit 8fcda12) Signed-off-by: Yi Chen <github@chenyicn.net> * Update Makefile for building sparkctl (kubeflow#2119) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 4bc6e89) Signed-off-by: Yi Chen <github@chenyicn.net> * fix: Add default values for namespaces to match usage descriptions (kubeflow#2128) * fix: Add default values for namespaces to match usage descriptions Signed-off-by: pengfei4.li <pengfei4.li@ly.com> * fix: remove incorrect cache settings Signed-off-by: pengfei4.li <pengfei4.li@ly.com> --------- Signed-off-by: pengfei4.li <pengfei4.li@ly.com> Co-authored-by: pengfei4.li <pengfei4.li@ly.com> (cherry picked from commit 52f818d) Signed-off-by: Yi Chen <github@chenyicn.net> * Fix: Spark role binding did not render properly when setting spark service account name (kubeflow#2135) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit a1a38ea) Signed-off-by: Yi Chen <github@chenyicn.net> * Reintroduce option webhook.enable (kubeflow#2142) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 9e88049) Signed-off-by: Yi Chen <github@chenyicn.net> * Add default batch scheduler argument (kubeflow#2143) * Add default batch scheduler argument Signed-off-by: Jacob Salway <jacob.salway@gmail.com> * Add helm unit test Signed-off-by: Jacob Salway <jacob.salway@gmail.com> --------- Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit 9cc1c02) Signed-off-by: Yi Chen <github@chenyicn.net> * fix: unable to set controller/webhook replicas to zero (kubeflow#2147) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 1afa72e) Signed-off-by: Yi Chen <github@chenyicn.net> * Adding support for setting spark job namespaces to all namespaces (kubeflow#2123) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit c93b0ec) Signed-off-by: Yi Chen <github@chenyicn.net> * Support extended kube-scheduler as batch scheduler (kubeflow#2136) * Support coscheduling with kube-scheduler plugins Signed-off-by: Yi Chen <github@chenyicn.net> * Add example for using kube-schulder coscheduling Signed-off-by: Yi Chen <github@chenyicn.net> --------- Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit e8d3de9) Signed-off-by: Yi Chen <github@chenyicn.net> * Run e2e tests on Kind (kubeflow#2148) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit c810ece) Signed-off-by: Yi Chen <github@chenyicn.net> * Set schedulerName to Yunikorn (kubeflow#2153) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit 62b4ca6) Signed-off-by: Yi Chen <github@chenyicn.net> * Create role and rolebinding for controller/webhook in every spark job namespace if not watching all namespaces (kubeflow#2129) watching all namespaces Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 592b649) Signed-off-by: Yi Chen <github@chenyicn.net> * Fix: e2e test failes due to webhook not ready (kubeflow#2149) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit dee91ba) Signed-off-by: Yi Chen <github@chenyicn.net> * Upgrade to Go 1.23.1 (kubeflow#2155) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit 10fcb8e) Signed-off-by: Yi Chen <github@chenyicn.net> * Upgrade to Spark 3.5.2 (kubeflow#2154) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit e1b7a27) Signed-off-by: Yi Chen <github@chenyicn.net> * Bump sigs.k8s.io/scheduler-plugins from 0.29.7 to 0.29.8 (kubeflow#2159) Bumps [sigs.k8s.io/scheduler-plugins](https://github.com/kubernetes-sigs/scheduler-plugins) from 0.29.7 to 0.29.8. - [Release notes](https://github.com/kubernetes-sigs/scheduler-plugins/releases) - [Changelog](https://github.com/kubernetes-sigs/scheduler-plugins/blob/master/RELEASE.md) - [Commits](kubernetes-sigs/scheduler-plugins@v0.29.7...v0.29.8) --- updated-dependencies: - dependency-name: sigs.k8s.io/scheduler-plugins dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 95d202e) Signed-off-by: Yi Chen <github@chenyicn.net> * feat: support driver and executor pod use different priority (kubeflow#2146) * feat: support driver and executor pod use different priority Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: if *app.Spec.Driver.PriorityClassName and *app.Spec.Executor.PriorityClassName specifically defined, then can precedence over spec.batchSchedulerOptions.priorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: merge the logic of setPodPriorityClassName into addPriorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: support driver and executor pod use different priority Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: if *app.Spec.Driver.PriorityClassName and *app.Spec.Executor.PriorityClassName specifically defined, then can precedence over spec.batchSchedulerOptions.priorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: merge the logic of setPodPriorityClassName into addPriorityClassName Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: add adjust pointer if is nil Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * feat: remove spec.batchSchedulerOptions.priorityClassName define , split driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: remove spec.batchSchedulerOptions.priorityClassName define , split driver and executor pod priorityClass Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * feat: Optimize code to avoid null pointer exceptions Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * fix: remove backup crd files Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> * fix: remove BatchSchedulerOptions.PriorityClassName test code Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> * fix: add driver and executor pod priorityClassName test code Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> --------- Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> Co-authored-by: Kevin Wu <kevin.wu@momenta.ai> (cherry picked from commit 6ae1b2f) Signed-off-by: Yi Chen <github@chenyicn.net> * Bump gocloud.dev from 0.37.0 to 0.39.0 (kubeflow#2160) Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.37.0 to 0.39.0. - [Release notes](https://github.com/google/go-cloud/releases) - [Commits](google/go-cloud@v0.37.0...v0.39.0) --- updated-dependencies: - dependency-name: gocloud.dev dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit e58023b) Signed-off-by: Yi Chen <github@chenyicn.net> * Update e2e tests (kubeflow#2161) * Add sleep buffer to ensture the webhooks are ready before running the e2e tests Signed-off-by: Yi Chen <github@chenyicn.net> * Remove duplicate operator image build tasks Signed-off-by: Yi Chen <github@chenyicn.net> * Update e2e tests Signed-off-by: Yi Chen <github@chenyicn.net> * Update examples Signed-off-by: Yi Chen <github@chenyicn.net> --------- Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit e6a7805) Signed-off-by: Yi Chen <github@chenyicn.net> * fix: webhook not working when settings spark job namespaces to empty (kubeflow#2163) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit 7785107) Signed-off-by: Yi Chen <github@chenyicn.net> * fix: The logger had an odd number of arguments, making it panic (kubeflow#2166) Signed-off-by: tcassaert <tcassaert@inuits.eu> (cherry picked from commit eb48b34) Signed-off-by: Yi Chen <github@chenyicn.net> * Upgrade to Spark 3.5.2(kubeflow#2012) (kubeflow#2157) * Upgrade to Spark 3.5.2 Signed-off-by: HyukSangCho <a01045542949@gmail.com> * Upgrade to Spark 3.5.2 Signed-off-by: HyukSangCho <a01045542949@gmail.com> * Upgrade to Spark 3.5.2 Signed-off-by: HyukSangCho <a01045542949@gmail.com> * Upgrade to Spark 3.5.2 Signed-off-by: HyukSangCho <a01045542949@gmail.com> --------- Signed-off-by: HyukSangCho <a01045542949@gmail.com> (cherry picked from commit 9f0c08a) Signed-off-by: Yi Chen <github@chenyicn.net> * Feature: Add pprof endpoint (kubeflow#2164) * add pprof support to the operator Controller Manager Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> * add pprof support to helm chart Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> --------- Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> (cherry picked from commit 75b9266) Signed-off-by: Yi Chen <github@chenyicn.net> * fix the make kind-delete-custer to avoid accidental kubeconfig deletion (kubeflow#2172) Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> (cherry picked from commit cbfefd5) Signed-off-by: Yi Chen <github@chenyicn.net> * Bump github.com/aws/aws-sdk-go-v2/config from 1.27.27 to 1.27.33 (kubeflow#2174) Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.27 to 1.27.33. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@config/v1.27.27...config/v1.27.33) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit b818332) Signed-off-by: Yi Chen <github@chenyicn.net> * Bump helm.sh/helm/v3 from 3.15.3 to 3.16.1 (kubeflow#2173) Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.15.3 to 3.16.1. - [Release notes](https://github.com/helm/helm/releases) - [Commits](helm/helm@v3.15.3...v3.16.1) --- updated-dependencies: - dependency-name: helm.sh/helm/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit f3f80d4) Signed-off-by: Yi Chen <github@chenyicn.net> * Add specific error in log line when failed to create web UI service (kubeflow#2170) * Add specific error in log line when failed to create web UI service Signed-off-by: tcassaert <tcassaert@inuits.eu> * Update log to reflect correct resource that could not be created Co-authored-by: Yi Chen <github@chenyicn.net> Signed-off-by: tcassaert <tcassaert@protonmail.com> --------- Signed-off-by: tcassaert <tcassaert@inuits.eu> Signed-off-by: tcassaert <tcassaert@protonmail.com> Co-authored-by: Yi Chen <github@chenyicn.net> (cherry picked from commit ed3226e) Signed-off-by: Yi Chen <github@chenyicn.net> * Account for spark.executor.pyspark.memory in Yunikorn gang scheduling (kubeflow#2178) Signed-off-by: Jacob Salway <jacob.salway@gmail.com> (cherry picked from commit a2f71c6) Signed-off-by: Yi Chen <github@chenyicn.net> * Fix: spark application does not respect time to live seconds (kubeflow#2165) * Add time to live seconds example spark application Signed-off-by: Yi Chen <github@chenyicn.net> * fix: spark application does not respect time to live seconds Signed-off-by: Yi Chen <github@chenyicn.net> --------- Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit c855ee4) Signed-off-by: Yi Chen <github@chenyicn.net> * Update release workflow and docs (kubeflow#2121) Signed-off-by: Yi Chen <github@chenyicn.net> (cherry picked from commit bca6aa8) Signed-off-by: Yi Chen <github@chenyicn.net> --------- Signed-off-by: Jacob Salway <jacob.salway@gmail.com> Signed-off-by: Yi Chen <github@chenyicn.net> Signed-off-by: pengfei4.li <pengfei4.li@ly.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Kevin Wu <kevin.wu@momenta.ai> Signed-off-by: Kevin.Wu <kevin.wu@momenta.ai> Signed-off-by: tcassaert <tcassaert@inuits.eu> Signed-off-by: HyukSangCho <a01045542949@gmail.com> Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com> Signed-off-by: tcassaert <tcassaert@protonmail.com> Co-authored-by: Jacob Salway <jacob.salway@gmail.com> Co-authored-by: Neo <56439757+snappyyouth@users.noreply.github.com> Co-authored-by: pengfei4.li <pengfei4.li@ly.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevinz <ruoshuidba@gmail.com> Co-authored-by: Kevin Wu <kevin.wu@momenta.ai> Co-authored-by: tcassaert <tcassaert@protonmail.com> Co-authored-by: ha2hi <56156892+ha2hi@users.noreply.github.com> Co-authored-by: Sébastien Maintrot <3097030+ImpSy@users.noreply.github.com>
🛑 Important:
Please open an issue to discuss significant work before you start. We appreciate your contributions and don't want your efforts to go to waste!
For guidelines on how to contribute, please review the CONTRIBUTING.md document.
Purpose of this PR
This PR enhances the Spark Operator to support setting different priorities for driver and executor pods. This feature allows for more granular control over resource allocation and scheduling in Kubernetes clusters.
Proposed changes:
Change Category
Indicate the type of change by marking the applicable boxes:
Rationale
In complex Kubernetes environments, there's often a need to prioritize Spark driver pods differently from executor pods. This change allows users to fine-tune their Spark application deployments, potentially improving overall cluster resource utilization and application performance.
Checklist
Before submitting your PR, please review the following:
Additional Notes
This feature introduces new fields in the SparkApplication CRD. Users will need to update their CRD definitions to take advantage of this new functionality. Backward compatibility is maintained for existing deployments.