Skip to content

Commit

Permalink
[Addon kubevela#579] Address the review suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: yanghua <[email protected]>
  • Loading branch information
yanghua committed Mar 1, 2023
1 parent b19a329 commit fc5d00b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
21 changes: 21 additions & 0 deletions examples/spark-kubernetes-operator/sparkapp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: spark-app-v1
namespace: spark-cluster
spec:
components:
- name: spark-workload-component
type: spark-workload
properties:
name: my-spark-app
namespace: spark-cluster
type: Scala
mode: cluster
image: "gcr.io/spark-operator/spark:v3.1.1"
imagePullPolicy: Always
mainClass: org.apache.spark.examples.streaming.JavaQueueStream
mainApplicationFile: "local:///opt/spark/examples/jars/spark-examples_2.12-3.1.1.jar"
sparkVersion: "3.1.1"
driverCores: 1
executorCores: 1
8 changes: 4 additions & 4 deletions experimental/addons/spark-kubernetes-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ vela addon status spark-kubernetes-operator
vela ls -A | grep spark
```

* Secondly, show the component type `spark-cluster`, so we know how to use it in one application. As a spark user, you can choose the parameter to set for your spark cluster.
* Secondly, show the component type `spark-workload`, so we know how to use it in one application. As a spark user, you can choose the parameter to set for your spark cluster.

```
vela show spark-application
vela show spark-workload
# Specification
+---------------------+------------------------------------------------------------------------------------------------------+-------------------+----------+---------+
| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
Expand Down Expand Up @@ -79,8 +79,8 @@ metadata:
namespace: spark-cluster
spec:
components:
- name: my-spark-application-component
type: spark-application
- name: spark-workload-component
type: spark-workload
properties:
name: my-spark-app
namespace: spark-cluster
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"spark-application": {
"spark-workload": {
annotations: {}
attributes: workload: type: "autodetects.core.oam.dev"
description: "Describes a containerized spark application that can specify resource spec."
Expand Down

0 comments on commit fc5d00b

Please sign in to comment.