Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.
Go to file
Yi Chen ef9a2a134b
Release v2.0.2 (#2233)
* FEATURE: add cli argument to modify controller workqueue ratelimiter (#2186)

* add cli argument to modify controller workqueue ratelimiter

Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com>

* add cli argument to modify controller workqueue ratelimiter 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 d37a0e938a)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Fix ingress capability discovery (#2201)

Signed-off-by: Jacob Salway <jacob.salway@gmail.com>
(cherry picked from commit 56b4974310)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump github.com/aws/aws-sdk-go-v2 from 1.30.5 to 1.31.0 (#2207)

Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.30.5 to 1.31.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.30.5...v1.31.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  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 faa0822ad0)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump golang.org/x/net from 0.28.0 to 0.29.0 (#2205)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.28.0 to 0.29.0.
- [Commits](https://github.com/golang/net/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  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 6106178c5f)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump github.com/docker/docker from 27.0.3+incompatible to 27.1.1+incompatible (#2125)

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 27.0.3+incompatible to 27.1.1+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v27.0.3...v27.1.1)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 316536f7b5)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.58.3 to 1.63.3 (#2206)

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.58.3 to 1.63.3.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.58.3...service/s3/v1.63.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  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 1972fb75d2)
Signed-off-by: Yi Chen <github@chenyicn.net>

* 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>
(cherry picked from commit 143b16ee75)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump github.com/aws/aws-sdk-go-v2 from 1.31.0 to 1.32.0 (#2229)

Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.31.0...v1.32.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  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 a4dcfcb328)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump cloud.google.com/go/storage from 1.43.0 to 1.44.0 (#2228)

Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.43.0...spanner/v1.44.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
  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 254200977b)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump manusa/actions-setup-minikube from 2.11.0 to 2.12.0 (#2226)

Bumps [manusa/actions-setup-minikube](https://github.com/manusa/actions-setup-minikube) from 2.11.0 to 2.12.0.
- [Release notes](https://github.com/manusa/actions-setup-minikube/releases)
- [Commits](https://github.com/manusa/actions-setup-minikube/compare/v2.11.0...v2.12.0)

---
updated-dependencies:
- dependency-name: manusa/actions-setup-minikube
  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 4358fd49bb)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump golang.org/x/time from 0.6.0 to 0.7.0 (#2227)

Bumps [golang.org/x/time](https://github.com/golang/time) from 0.6.0 to 0.7.0.
- [Commits](https://github.com/golang/time/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  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 29ba4e72b0)
Signed-off-by: Yi Chen <github@chenyicn.net>

* fix: imagePullPolicy was ignored (#2222)

Signed-off-by: xuqingtan <missedone@gmail.com>
(cherry picked from commit 7fb14e629e)
Signed-off-by: Yi Chen <github@chenyicn.net>

* fix: spark-submission failed due to lack of permission by user `spark` (#2223)

error: Exception in thread "main" java.io.FileNotFoundException: /home/spark/.ivy2/cache/resolved-org.apache.spark-spark-submit-parent-511288aa-ce7c-4a38-9c8e-4869b71c68fa-1.0.xml (No such file or directory)

Signed-off-by: xuqingtan <missedone@gmail.com>
(cherry picked from commit d07821bcba)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump github.com/aws/aws-sdk-go-v2/config from 1.27.33 to 1.27.42 (#2231)

Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.33 to 1.27.42.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.33...config/v1.27.42)

---
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 9be8dceb48)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Bump github.com/prometheus/client_golang from 1.19.1 to 1.20.4 (#2204)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.1 to 1.20.4.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.1...v1.20.4)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  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 fe833fa127)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Remove `cap_net_bind_service` from image (#2216)

Signed-off-by: Jacob Salway <jacob.salway@gmail.com>
(cherry picked from commit ac761ef511)
Signed-off-by: Yi Chen <github@chenyicn.net>

* fix: webhook panics due to logging (#2232)

Signed-off-by: Yi Chen <github@chenyicn.net>
(cherry picked from commit 247e834456)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Add check for generating manifests and code (#2234)

Signed-off-by: Yi Chen <github@chenyicn.net>
(cherry picked from commit c75d99f65b)
Signed-off-by: Yi Chen <github@chenyicn.net>

* Spark Operator Official Release v2.0.2

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

---------

Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com>
Signed-off-by: Yi Chen <github@chenyicn.net>
Signed-off-by: Jacob Salway <jacob.salway@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: xuqingtan <missedone@gmail.com>
Co-authored-by: Sébastien Maintrot <3097030+ImpSy@users.noreply.github.com>
Co-authored-by: Jacob Salway <jacob.salway@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nick Tan <missedone@gmail.com>
2024-10-10 15:13:09 +00:00
.github Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
api Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
charts/spark-operator-chart Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
cmd Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
config Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
docs Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
examples Cherry pick commits for releasing v2.0.0 (#2156) 2024-09-23 01:58:32 +00:00
hack Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00
internal Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
pkg Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
spark-docker Cherry pick commits for releasing v2.0.0 (#2156) 2024-09-23 01:58:32 +00:00
sparkctl Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
test/e2e Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
.dockerignore Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00
.gitignore Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00
.golangci.yaml Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
.pre-commit-config.yaml Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00
ADOPTERS.md Update README and documentation (#2047) 2024-06-27 11:05:11 +00:00
CODE_OF_CONDUCT.md Add code of conduct and update contributor guide (#2074) 2024-06-26 18:38:10 +00:00
CONTRIBUTING.md Add code of conduct and update contributor guide (#2074) 2024-06-26 18:38:10 +00:00
Dockerfile Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
LICENSE Added LICENSE 2017-09-09 16:04:29 -07:00
Makefile Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
OWNERS Add ChenYi015 as spark-operator reviewer (#2045) 2024-06-05 02:12:02 +00:00
PROJECT Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00
README.md Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00
VERSION Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
codecov.yaml Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00
entrypoint.sh Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00
go.mod Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
go.sum Release v2.0.2 (#2233) 2024-10-10 15:13:09 +00:00
test.sh feat: add support for service labels on driver-svc (#1985) 2024-04-26 00:44:46 +00:00
version.go Cherry pick #2081 #2046 #2091 #2072 (#2108) 2024-08-01 22:06:06 +00:00

README.md

Kubeflow Spark Operator

Go Report Card

What is Spark Operator?

The Kubernetes Operator for Apache Spark aims to make specifying and running Spark applications as easy and idiomatic as running other workloads on Kubernetes. It uses Kubernetes custom resources for specifying, running, and surfacing status of Spark applications.

Overview

For a complete reference of the custom resource definitions, please refer to the API Definition. For details on its design, please refer to the Architecture. It requires Spark 2.3 and above that supports Kubernetes as a native scheduler backend.

The Kubernetes Operator for Apache Spark currently supports the following list of features:

  • Supports Spark 2.3 and up.
  • Enables declarative application specification and management of applications through custom resources.
  • Automatically runs spark-submit on behalf of users for each SparkApplication eligible for submission.
  • Provides native cron support for running scheduled applications.
  • Supports customization of Spark pods beyond what Spark natively is able to do through the mutating admission webhook, e.g., mounting ConfigMaps and volumes, and setting pod affinity/anti-affinity.
  • Supports automatic application re-submission for updated SparkApplication objects with updated specification.
  • Supports automatic application restart with a configurable restart policy.
  • Supports automatic retries of failed submissions with optional linear back-off.
  • Supports mounting local Hadoop configuration as a Kubernetes ConfigMap automatically via sparkctl.
  • Supports automatically staging local application dependencies to Google Cloud Storage (GCS) via sparkctl.
  • Supports collecting and exporting application-level metrics and driver/executor metrics to Prometheus.

Project Status

Project status: beta

Current API version: v1beta2

If you are currently using the v1beta1 version of the APIs in your manifests, please update them to use the v1beta2 version by changing apiVersion: "sparkoperator.k8s.io/<version>" to apiVersion: "sparkoperator.k8s.io/v1beta2". You will also need to delete the previous version of the CustomResourceDefinitions named sparkapplications.sparkoperator.k8s.io and scheduledsparkapplications.sparkoperator.k8s.io, and replace them with the v1beta2 version either by installing the latest version of the operator or by running kubectl create -f config/crd/bases.

Prerequisites

  • Version >= 1.13 of Kubernetes to use the subresource support for CustomResourceDefinitions, which became beta in 1.13 and is enabled by default in 1.13 and higher.

  • Version >= 1.16 of Kubernetes to use the MutatingWebhook and ValidatingWebhook of apiVersion: admissionregistration.k8s.io/v1.

Getting Started

For getting started with Spark operator, please refer to Getting Started.

User Guide

For detailed user guide and API documentation, please refer to User Guide and API Specification.

If you are running Spark operator on Google Kubernetes Engine (GKE) and want to use Google Cloud Storage (GCS) and/or BigQuery for reading/writing data, also refer to the GCP guide.

Version Matrix

The following table lists the most recent few versions of the operator.

Operator Version API Version Kubernetes Version Base Spark Version
v1beta2-1.6.x-3.5.0 v1beta2 1.16+ 3.5.0
v1beta2-1.5.x-3.5.0 v1beta2 1.16+ 3.5.0
v1beta2-1.4.x-3.5.0 v1beta2 1.16+ 3.5.0
v1beta2-1.3.x-3.1.1 v1beta2 1.16+ 3.1.1
v1beta2-1.2.3-3.1.1 v1beta2 1.13+ 3.1.1
v1beta2-1.2.2-3.0.0 v1beta2 1.13+ 3.0.0
v1beta2-1.2.1-3.0.0 v1beta2 1.13+ 3.0.0
v1beta2-1.2.0-3.0.0 v1beta2 1.13+ 3.0.0
v1beta2-1.1.x-2.4.5 v1beta2 1.13+ 2.4.5
v1beta2-1.0.x-2.4.4 v1beta2 1.13+ 2.4.4

Developer Guide

For developing with Spark Operator, please refer to Developer Guide.

Contributor Guide

For contributing to Spark Operator, please refer to Contributor Guide.

Community

Adopters

Check out adopters of Spark Operator.