Skip to content

Commit

Permalink
chore: bump spark-operator version to v2.0.2
Browse files Browse the repository at this point in the history
Fix some issues with tests,

Signed-off-by: Gezim Sejdiu <g.sejdiu@gmail.com>
  • Loading branch information
GezimSejdiu committed Oct 14, 2024
1 parent 007d37a commit a6f16d4
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 52 deletions.
2 changes: 1 addition & 1 deletion contrib/spark/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SPARK_OPERATOR_RELEASE_VERSION ?= 2.0.1
SPARK_OPERATOR_RELEASE_VERSION ?= 2.0.2
SPARK_OPERATOR_HELM_CHART_REPO ?= https://kubeflow.github.io/spark-operator

.PHONY: spark-operator/base
Expand Down
91 changes: 47 additions & 44 deletions contrib/spark/spark-operator/base/resources.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Source: spark-operator/crds/sparkoperator.k8s.io_scheduledsparkapplications.yaml
# Source: crds/sparkoperator.k8s.io_scheduledsparkapplications.yaml
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -9607,8 +9607,8 @@ spec:
additionalProperties:
type: string
description: |-
HadoopConf carries user-specified Hadoop configuration properties as they would use the the "--conf" option
in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop
HadoopConf carries user-specified Hadoop configuration properties as they would use the "--conf" option
in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop
configuration properties.
type: object
hadoopConfigMap:
Expand Down Expand Up @@ -11624,7 +11624,7 @@ spec:
status: {}

---
# Source: spark-operator/crds/sparkoperator.k8s.io_sparkapplications.yaml
# Source: crds/sparkoperator.k8s.io_sparkapplications.yaml
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -21141,8 +21141,8 @@ spec:
additionalProperties:
type: string
description: |-
HadoopConf carries user-specified Hadoop configuration properties as they would use the the "--conf" option
in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop
HadoopConf carries user-specified Hadoop configuration properties as they would use the "--conf" option
in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop
configuration properties.
type: object
hadoopConfigMap:
Expand Down Expand Up @@ -23190,10 +23190,10 @@ metadata:
name: spark-operator-controller
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: controller
---
Expand All @@ -23204,10 +23204,10 @@ metadata:
name: spark-operator-spark
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
---
# Source: spark-operator/templates/webhook/serviceaccount.yaml
Expand All @@ -23217,10 +23217,10 @@ metadata:
name: spark-operator-webhook
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
---
Expand All @@ -23231,10 +23231,10 @@ metadata:
name: spark-operator-controller
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: controller
rules:
Expand Down Expand Up @@ -23266,10 +23266,10 @@ metadata:
name: spark-operator-webhook
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
rules:
Expand Down Expand Up @@ -23307,10 +23307,10 @@ metadata:
name: spark-operator-controller
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: controller
subjects:
Expand All @@ -23329,10 +23329,10 @@ metadata:
name: spark-operator-webhook
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
subjects:
Expand All @@ -23351,10 +23351,10 @@ metadata:
name: spark-operator-controller
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: controller
rules:
Expand Down Expand Up @@ -23463,10 +23463,10 @@ metadata:
name: spark-operator-spark
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
rules:
- apiGroups:
Expand All @@ -23493,10 +23493,10 @@ metadata:
name: spark-operator-webhook
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
rules:
Expand Down Expand Up @@ -23571,10 +23571,10 @@ metadata:
name: spark-operator-controller
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: controller
subjects:
Expand All @@ -23593,10 +23593,10 @@ metadata:
name: spark-operator-spark
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
subjects:
- kind: ServiceAccount
Expand All @@ -23614,10 +23614,10 @@ metadata:
name: spark-operator-webhook
namespace: default
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
subjects:
Expand All @@ -23635,10 +23635,10 @@ kind: Service
metadata:
name: spark-operator-webhook-svc
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
spec:
Expand All @@ -23657,10 +23657,10 @@ kind: Deployment
metadata:
name: spark-operator-controller
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: controller
spec:
Expand All @@ -23683,7 +23683,7 @@ spec:
spec:
containers:
- name: spark-operator-controller
image: docker.io/kubeflow/spark-operator:2.0.1
image: docker.io/kubeflow/spark-operator:2.0.2
imagePullPolicy: IfNotPresent
args:
- controller
Expand All @@ -23700,6 +23700,9 @@ spec:
- --leader-election=true
- --leader-election-lock-name=spark-operator-controller-lock
- --leader-election-lock-namespace=default
- --workqueue-ratelimiter-bucket-qps=50
- --workqueue-ratelimiter-bucket-size=500
- --workqueue-ratelimiter-max-delay=6h
ports:
- name: "metrics"
containerPort: 8080
Expand All @@ -23721,10 +23724,10 @@ kind: Deployment
metadata:
name: spark-operator-webhook
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
spec:
Expand All @@ -23743,7 +23746,7 @@ spec:
spec:
containers:
- name: spark-operator-webhook
image: docker.io/kubeflow/spark-operator:2.0.1
image: docker.io/kubeflow/spark-operator:2.0.2
imagePullPolicy: IfNotPresent
args:
- webhook
Expand Down Expand Up @@ -23788,10 +23791,10 @@ kind: MutatingWebhookConfiguration
metadata:
name: spark-operator-webhook
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
webhooks:
Expand Down Expand Up @@ -23871,10 +23874,10 @@ kind: ValidatingWebhookConfiguration
metadata:
name: spark-operator-webhook
labels:
helm.sh/chart: spark-operator-2.0.1
helm.sh/chart: spark-operator-2.0.2
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/version: "2.0.1"
app.kubernetes.io/version: "2.0.2"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: webhook
webhooks:
Expand Down
3 changes: 2 additions & 1 deletion contrib/spark/sparkapplication_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: sparkoperator.k8s.io/v1beta2
kind: SparkApplication
metadata:
name: spark-pi-python
namespace: default
spec:
type: Python
pythonVersion: "3"
Expand All @@ -21,3 +20,5 @@ spec:
instances: 1
cores: 1
memory: 512m
annotations:
"sidecar.istio.io/inject": "false"
12 changes: 6 additions & 6 deletions contrib/spark/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ done

echo "Namespace $NAMESPACE has been created!"

kubectl label namespace $NAMESPACE istio-injection=enabled
kubectl label namespace $NAMESPACE istio-injection=enabled --overwrite

kubectl get namespaces --selector=istio-injection=enabled

# Install Spark operator
kustomize build spark-operator/overlays/standalone | kubectl -n kubeflow apply --server-side -f -

# Wait for the operator to be ready.
kubectl -n kubeflow wait --for=condition=available --timeout=600s deploy/spark-operator
kubectl -n kubeflow get pod -l app.kubernetes.io/component=spark-operator
kubectl -n kubeflow wait --for=condition=available --timeout=600s deploy/spark-operator-controller
kubectl -n kubeflow get pod -l app.kubernetes.io/name=spark-operator

# Install Spark components
kubectl -n $NAMESPACE apply -f sparkapplication_example.yaml

# Wait for the Spark to be ready.
sleep 5
kubectl -n $NAMESPACE wait --for=condition=ready pod -l sparkoperator.k8s.io/sparkapplication=kubeflow-sparkapplication --timeout=900s
kubectl -n $NAMESPACE logs -l sparkoperator.k8s.io/sparkapplication=kubeflow-sparkapplication,sparkoperator.k8s.io/node-type=head
kubectl -n $NAMESPACE wait --for=condition=ready pod -l sparkoperator.k8s.io/sparkapplication=spark-pi-python --timeout=900s
kubectl -n $NAMESPACE logs -l sparkoperator.k8s.io/sparkapplication=spark-pi-python, sparkoperator.k8s.io/node-type=head

# Forward the port of Spark UI
sleep 5
kubectl -n $NAMESPACE port-forward --address 0.0.0.0 svc/kubeflow-sparkapplication-head-svc 4040 :4040 &
kubectl -n $NAMESPACE port-forward --address 0.0.0.0 svc/spark-pi-python-head-svc 4040 :4040 &
PID=$!
echo "Forward the port 4040 of Spark head in the background process: $PID"

Expand Down

0 comments on commit a6f16d4

Please sign in to comment.