Skip to content

feat(spark)!: delegate SparkApplication driver service account to the Spark Operator - #776

Open
adibmbrk wants to merge 10 commits into
kubeflow:mainfrom
adibmbrk:remove-spark-job-default-service-account
Open

feat(spark)!: delegate SparkApplication driver service account to the Spark Operator#776
adibmbrk wants to merge 10 commits into
kubeflow:mainfrom
adibmbrk:remove-spark-job-default-service-account

Conversation

@adibmbrk

Copy link
Copy Markdown

What this PR does / why we need it:

Removes the hardcoded spark-operator-spark default service account for the SparkApplication driver spec. The Spark Operator now supports a fallback service account mechanism for the driver (kubeflow/spark-operator#3092, merged), so the SDK no longer needs to set this default itself. get_spark_job_driver_spec now leaves service_account unset unless a caller explicitly provides one via Driver.service_account, keeping the SDK decoupled from operator cluster-admin concerns.

Which issue(s) this PR fixes:

Fixes #616

Checklist:

  • Docs included if any changes are user facing

…tion driver

The Spark Operator now provides a fallback service account mechanism for
the SparkApplication driver spec (kubeflow/spark-operator#3092), so the
SDK no longer needs to hardcode `spark-operator-spark` as the default.
This keeps the SDK decoupled from operator cluster-admin concerns while
still allowing callers to override the service account via
`Driver.service_account`.

Signed-off-by: adibmbrk <adibmbrk@gmail.com>
Copilot AI balanced review requested due to automatic review settings August 30, 2026 02:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kramaranya for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Welcome to the Kubeflow SDK! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

  • If you haven't already, please check out our Contributing Guide for repo-specific guidelines and the Kubeflow Contributor Guide for general community standards
  • Our team will review your PR soon! cc @kubeflow/kubeflow-sdk-team

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

@tariq-hasan

Copy link
Copy Markdown
Member

/ok-to-test
/retest

@tariq-hasan

Copy link
Copy Markdown
Member

/retitle feat(spark)!: delegate SparkApplication driver service account to the Spark Operator

@google-oss-prow google-oss-prow Bot changed the title fix(spark): remove hardcoded default service account for SparkApplication driver feat(spark)!: delegate SparkApplication driver service account to the Spark Operator Aug 31, 2026

@tariq-hasan tariq-hasan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @adibmbrk! I have added a few comments.

Comment thread kubeflow/spark/backends/kubernetes/utils.py Outdated
Comment thread kubeflow/spark/backends/kubernetes/utils_test.py Outdated
Comment thread kubeflow/spark/backends/kubernetes/utils_test.py Outdated
Comment thread examples/spark/README.md Outdated
Comment thread docs/source/spark/index.rst Outdated
Comment thread kubeflow/spark/backends/kubernetes/utils_test.py Outdated
Comment thread kubeflow/spark/backends/kubernetes/utils.py
@tariq-hasan

Copy link
Copy Markdown
Member

/assign

adibmbrk and others added 7 commits August 31, 2026 06:23
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Adib Mubarak <121048412+adibmbrk@users.noreply.github.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Adib Mubarak <121048412+adibmbrk@users.noreply.github.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Adib Mubarak <121048412+adibmbrk@users.noreply.github.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Adib Mubarak <121048412+adibmbrk@users.noreply.github.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Adib Mubarak <121048412+adibmbrk@users.noreply.github.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Adib Mubarak <121048412+adibmbrk@users.noreply.github.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Adib Mubarak <121048412+adibmbrk@users.noreply.github.com>
@adibmbrk

Copy link
Copy Markdown
Author

/retest

@Goku2099 Goku2099 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Comment thread kubeflow/spark/backends/kubernetes/utils_test.py
get_spark_job_driver_spec previously ignored driver.service_account
entirely, silently dropping any custom value set on Driver. Wire it
through to SparkV1beta2DriverSpec, falling back to unset when no
driver or service account is provided.

Signed-off-by: adibmbrk <adibmbrk@gmail.com>
@adibmbrk

adibmbrk commented Sep 4, 2026

Copy link
Copy Markdown
Author

Hi @tariq-hasan @Goku2099! Thank you for the review. I have addressed all your comments. Let me know if further changes are needed.

This reverts commit a739415.

Signed-off-by: adibmbrk <adibmbrk@gmail.com>
@tariq-hasan

Copy link
Copy Markdown
Member

Thanks!
/lgtm

@google-oss-prow google-oss-prow Bot added the lgtm label Sep 5, 2026
@tariq-hasan

Copy link
Copy Markdown
Member

@andreyvelich I am wondering how we should move this PR forward. This change depends on kubeflow/spark-operator#3049 which has been completed recently.

As there is an upstream dependency that has not been released yet I am thinking if we'd need a release note for the breaking change that would basically only work for the next operator release - v2.6.0.

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.

KEP-107: Remove SparkJob service account defaulting in Spark package

4 participants