Commit Graph

37 Commits

Author SHA1 Message Date
jbhalodia-slack ca37f6b7b3
Add ShuffleTrackingEnabled to DynamicAllocation struct to allow disabling shuffle tracking (#2511)
* Add ShuffleTrackingEnabled *bool to DynamicAllocation struct to allow disabling shuffle tracking

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

* Run make generate

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

* make manifests

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

* make update-crd && make build-api-docs

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

* Update internal/controller/sparkapplication/submission.go

Co-authored-by: Yi Chen <github@chenyicn.net>
Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

* Go fmt

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

* Refactor defaultExecutorSpec func

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

* Refactor dynamicAllocationOption func

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

* Add IsDynamicAllocationEnabled func

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>

---------

Signed-off-by: jbhalodia-slack <jbhalodia@salesforce.com>
Co-authored-by: Yi Chen <github@chenyicn.net>
2025-05-14 05:49:22 +00:00
Daniel Freitas 5a97ca4daa
Enable the override of MemoryLimit through webhook (#2478)
* Documentation and interface definition

Signed-off-by: danielrs <danielrs@ibm.com>

* addMemoryLimit and convertion methods

Signed-off-by: danielrs <danielrs@ibm.com>

* Unit tests

Signed-off-by: danielrs <danielrs@ibm.com>

* Deepcopy

Signed-off-by: danielrs <danielrs@ibm.com>

* Adjustments after make command

Signed-off-by: danielrs <danielrs@ibm.com>

* Address comments

Signed-off-by: danielrs <danielrs@ibm.com>

---------

Signed-off-by: danielrs <danielrs@ibm.com>
Co-authored-by: danielrs <danielrs@ibm.com>
2025-04-21 07:12:26 +00:00
Jacob Salway 50ae7a0062
Add timeZone to ScheduledSparkApplication (#2471)
* Add timeZone to ScheduledSparkApplication

Signed-off-by: Jacob Salway <jacob.salway@gmail.com>

* Update api/v1beta2/scheduledsparkapplication_types.go

Co-authored-by: Yi Chen <github@chenyicn.net>
Signed-off-by: Jacob Salway <jacob.salway@gmail.com>

---------

Signed-off-by: Jacob Salway <jacob.salway@gmail.com>
Co-authored-by: Yi Chen <github@chenyicn.net>
2025-03-31 02:12:30 +00:00
Yi Chen d0daf2fd17
Support pod template for Spark 3.x applications (#2141)
* Update API definition to support pod template

Signed-off-by: Yi Chen <github@chenyicn.net>

* Mark pod template field as schemaless

Signed-off-by: Yi Chen <github@chenyicn.net>

* Add kubebuilder marker to preserve unknown fields

Signed-off-by: Yi Chen <github@chenyicn.net>

* Add example for using pod template

Signed-off-by: Yi Chen <github@chenyicn.net>

* Support pod template

Signed-off-by: Yi Chen <github@chenyicn.net>

---------

Signed-off-by: Yi Chen <github@chenyicn.net>
2024-10-24 02:23:30 +00:00
Thomas Newton 5ff8dcf350
`omitempty` corrections (#2255)
* Still working on tests

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Maybe progress

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* First working validation

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Lots of cleanup needed but it actually reproduced

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Working but ugly get schema from CRD

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Satisfactory test

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Add missing omitempty for optional values

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Remove omitempty on required fields

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Run update-crd

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Remove temp schema config

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Tidy

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* go import

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Cover more test cases

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Add tests that spec and metadata are required

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Add tests against error content

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* `go mod tidy`

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Fix lint

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Remove test - hopefully we can add a better test as a follow up

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Make `mainApplicationFile` required

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Regenerated api-docs

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

* Add `MainApplicationFile` in tests

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>

---------

Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>
2024-10-18 11:06:20 +00:00
bo a1de26dd31
feat: support archives param for spark-submit (#2256)
Signed-off-by: kaka-zb <sin19990111@gmail.com>
2024-10-16 06:20:18 +00:00
Yi Chen 143b16ee75
Update integration test workflow and add golangci lint check (#2197)
* Update integration test workflow

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update golangci lint config

Signed-off-by: Yi Chen <github@chenyicn.net>

---------

Signed-off-by: Yi Chen <github@chenyicn.net>
2024-10-08 02:06:07 +00:00
Kevinz 6ae1b2f69c
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>
2024-09-10 06:27:19 +00:00
Yi Chen 0dc641bd1d
Use controller-runtime to reconsturct spark operator (#2072)
* Use controller-runtime to reconstruct spark operator

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update helm charts

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>
2024-08-01 12:29:06 +00:00
Yi Chen 779ea3debc
Update the process to build api-docs, generate CRD manifests and code (#2046)
* Update .gitignore

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update .dockerignore

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update Makefile

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update the process to generate api docs

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update the workflow to generate api docs

Signed-off-by: Yi Chen <github@chenyicn.net>

* Use controller-gen to generate CRD and deep copy related methods

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update helm chart CRDs

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update workflow for building spark operator

Signed-off-by: Yi Chen <github@chenyicn.net>

* Update README.md

Signed-off-by: Yi Chen <github@chenyicn.net>

---------

Signed-off-by: Yi Chen <github@chenyicn.net>
2024-07-22 05:10:00 +00:00
Bo Yang b723367d79
Support exposing extra TCP ports in Spark Driver via K8s Ingress (#1998)
* Add driverIngressOptions in SparkApplication CRD

Signed-off-by: Bo (AIML) Yang <bo_yang6@apple.com>

* Update chart version to 1.3.0

Signed-off-by: Bo (AIML) Yang <bo_yang6@apple.com>

* Update helm chart README

Signed-off-by: Bo (AIML) Yang <bo_yang6@apple.com>

* Fix make detect-crds-drift

Signed-off-by: Bo (AIML) Yang <bo_yang6@apple.com>

* Update api-docs.md

Signed-off-by: Bo (AIML) Yang <bo_yang6@apple.com>

---------

Signed-off-by: Bo (AIML) Yang <bo_yang6@apple.com>
2024-05-20 19:42:48 +00:00
Cian Gallagher 333ee0bcb2
feat: add support for service labels on driver-svc (#1985)
* feat: add support for service labels on driver-svc

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* docs: update helm docs

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* fix: undo changes to api-docs

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* docs: update api-docs

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* fix: update appVersion

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* ci: remove step to check api change

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* docs: update helm-docs

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* docs: update helm-docs

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* fix: update app version

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

* docs: update helm docs

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>

---------

Signed-off-by: Cian Gallagher <cian.gallagher@zendesk.com>
2024-04-26 00:44:46 +00:00
Zev Isert 7e34e7ea1e
chore: replace GoogleCloudPlatform/spark-on-k8s-operator with kubeflow/spark-operator (#1937)
Signed-off-by: Zev Isert <dev@zevisert.ca>
2024-04-08 18:01:27 +00:00
Cian Gallagher 8a31a4638c
feat: add support for custom service labels (#1952)
* feat: add support for custom service labels

Signed-off-by: Cian Gallagher <cian@ciangallagher.net>

* chore: correctly format files

Signed-off-by: Cian Gallagher <cian@ciangallagher.net>

* chore: bump chart version to 1.1.30

Signed-off-by: Cian Gallagher <cian@ciangallagher.net>

---------

Signed-off-by: Cian Gallagher <cian@ciangallagher.net>
2024-04-07 16:58:26 +00:00
ordukhanian 86d71c828b
* Added support for `seccompProfile` in Spark application CRD. It is necessary for Kubernetes Pod Security Standards Restricted profile. (#1768)
https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted

* Fixed pre-commit jobs.
  `build-helm-chart` and `integration-test` were failing with:
  `Run manusa/actions-setup-minikube@v2.4.2
   Error: Unsupported OS, action only works in Ubuntu 18 or 20`
2023-10-26 09:30:27 -07:00
Andrei Neagoe 651c17e5f4
Updated default registry to ghcr.io (#1454)
* Updated default registry to ghcr.io

* Bumped chart version and built api-docs

* Updated build-helm-chart job, step Run chart-testing (install) to look for the correct registry
2022-02-13 09:44:27 -08:00
TomHellier ba16242de9
Various CI improvements (#1418)
This change renames the github workflows to be clearer about their purpose, and adds a set of tests which
aim to force developers to increment the appVersion if they have changed anything with the spark-operator docker container
or the chart version if they have updated the chart.

Signed-off-by: Tom Hellier <me@tomhellier.com>
2021-12-03 15:51:23 -08:00
Khor Shu Heng a123efd912
Allow user to specify service annotation on Spark UI service (#1264)
* Allow user to specify service annotation on Spark UI service

* Add service annotation in chart crd

Signed-off-by: Khor Shu Heng <khor.heng@gojek.com>

* Bump chart version

Signed-off-by: Khor Shu Heng <khor.heng@gojek.com>

Co-authored-by: Khor Shu Heng <khor.heng@gojek.com>
2021-05-25 14:40:05 -07:00
Sébastien Maintrot 7ce314d772
implement shareProcessNamespace in SparkPodSpec (#1262)
* implement shareProcessNamespace in SparkPodSpec

* fixup! implement shareProcessNamespace in SparkPodSpec
2021-05-24 22:27:21 -07:00
Marco Zoveralli 7f2ccdbe2a
[#1239] Custom service port name for spark application UI (#1240)
* [operator] Adding service port name for spark UI exposure

* cleanup
2021-04-30 13:29:31 -07:00
Josh Soref 085fb68298
Spelling (#1231)
* spelling: additional

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: additionally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: annotations

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: application

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: configuration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: context

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: defaults

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependencies

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: details

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: enqueuing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: existence

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: github

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: in-cluster

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: macos

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: metric

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: namespaces

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: optionally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: package

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: period

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: podsecuritycontext

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: relative

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: scheduler

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: service

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: site

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specifying

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: standard

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: streaming

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: successful

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: termination

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unrelated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: update

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: usage

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* Whitespace

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-04-20 09:36:38 -07:00
Luiz Muller eb07ee050c
Add support to expose custom ports (#1205)
* feat: add port parameter

* fix: rename func

* fix: update api-docs

* fix: use ports parameter into driver and executor spec

* fix: cr

* fix: cr
2021-03-30 08:53:11 -07:00
Sébastien Maintrot 2c50feac66
add hostAliases for SparkPodSpec (#1133)
* add hostAliases for SparkPodSpec and update codegen files

* add webhook patcher for HostAliases + add tests

* update chart CRDs

* update api doc
2021-01-19 16:45:26 -08:00
Pascal GILLET b13e8202fb
Propagate Spark app's priorityClassName to pods' spec (#1054)
* Propagate Spark app's priorityClassName to pods' spec

* Fix nil pointer dereference
2020-11-10 09:35:44 -08:00
Yinan Li bd1b7ec1f2
Updated generated code, CRD definitions, and API doc (#1045) 2020-10-18 20:45:53 -07:00
Abhilash Pallerlamudi a802d14c10
fixes typo in PodSecurityContext and SecurityContext in SparkPodSpec (#1030)
Signed-off-by: Abhilash Pallerlamudi <stp.abhi@gmail.com>
2020-09-24 13:22:17 -07:00
Abhilash Pallerlamudi 152f0434b4
add proxy user support (#1022)
Signed-off-by: Abhilash Pallerlamudi <stp.abhi@gmail.com>
2020-09-24 12:09:06 -07:00
Yinan Li 3ca74728a3
Add support for dynamic allocation via shuffle tracking (#976) 2020-07-16 11:16:47 -07:00
Yinan Li 555c27a487
Added support for some config options new in Spark 3.0.0 (#954) 2020-06-26 14:06:44 -07:00
Yinan Li 8c480acfdd
Made field serviceAccount available for both driver and executors (#924)
Spark 3.0 will support specifying a k8s service account for the executor pods. This CL prepares the operator to support that in the upcoming Spark 3.0.0 release.
2020-05-24 13:52:11 -07:00
Ali Gouta cd632f1888
Support changing port in ui exposition (#914)
* support custom seriveport and targetport

* support customizing ingress object with specific port and annotations

* change expositionOptions into sparkUIOptions + code enhancement

* update return of functions getUIServicePort and getUITargetPort
2020-05-20 09:42:00 -07:00
jinxingwang 5afcce2919
add fix for metricsProperties when HasPrometheusConfigFile is true. (#847)
* add fix for metricsProperties when HasPrometheusConfigFile is true.

* add new config MetricsPropertiesFile.

* add missing auto-generated code from privous PRs.

* fix monitoring_config_test.go test condition, redo the configmap logic in monitoring_config.go.

* redo the configmap & javaOption logic in monitoring_config.go.

* set back the configmap & javaOption logic in monitoring_config.go

* update log.
2020-03-31 09:14:10 -07:00
Yinan Li 4e0c778951
Updated api-docs.md (#799) 2020-02-10 16:11:56 -08:00
Yinan Li 1c4486cdda
Removed legacy init-container related fields (#750) 2019-12-20 10:08:05 -08:00
Yinan Li bbc3e71442
Updated CRD yamls and API docs (#749) 2019-12-19 16:21:09 -08:00
Yinan Li 52dc9a6412
Added support for separate ket for driver physical CPU request (#748) 2019-12-19 15:15:18 -08:00
Yinan Li b2a326ecaf
Added generated API doc (#747) 2019-12-19 14:34:49 -08:00