Skip to content

Commit

Permalink
[Addon kubevela#603] Add Apache Spark as a experimental addon
Browse files Browse the repository at this point in the history
Signed-off-by: yanghua <[email protected]>
  • Loading branch information
yanghua committed Feb 8, 2023
1 parent 76774ef commit 96a5260
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
20 changes: 20 additions & 0 deletions experimental/addons/spark-kubernetes-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,23 @@ A kubernetes operator for Apache Spark(https://github.com/GoogleCloudPlatform/sp
vela addon enable fluxcd
vela addon enable spark-kubernetes-operator
```

# Uninstall

```
vela addon disable spark-kubernetes-operator
vela addon disable fluxcd
```

# To check the spark-kubernetes-operator running status

* Firstly, check the spark-kubernetes-operator (and the fluxcd and we need to deploy by helm) running status

```
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


Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
"spark-cluster": {
annotations: {}
attributes: workload: type: "autodetects.core.oam.dev"
description: "Spark Component."
labels: {}
type: "component"
}

template: {
parameter: {
name: string
namespace: string
type: string
mode: string
image: string
imagePullPolicy: string
mainClass: string
mainApplicationFile: string
sparkVersion: string
driverCores: int
executorCores: int
}

output: {
kind: "ClusterRoleBinding"
apiVersion: "rbac.authorization.k8s.io/v1"
metadata: name: parameter.name
roleRef: {
name: "edit"
apiGroup: "rbac.authorization.k8s.io"
kind: "ClusterRole"
}
subjects: [{
name: "default"
kind: "ServiceAccount"
namespace: parameter.namespace
}]
}

outputs: {

"spark": {
kind: "SparkApplication"
apiVersion: "sparkoperator.k8s.io/v1beta2"
metadata: {
name: parameter.name
namespace: parameter.namespace
}
spec: {
type: parameter.type
mode: parameter.mode
image: parameter.image
imagePullPolicy: parameter.imagePullPolicy
mainClass: parameter.mainClass
mainApplicationFile: parameter.mainApplicationFile
sparkVersion: parameter.sparkVersion
driver: {
cores: parameter.driverCores
}
executor: {
cores: parameter.executorCores
}
}
}

}
}

0 comments on commit 96a5260

Please sign in to comment.