diff --git a/experimental/addons/spark-kubernetes-operator/definitions/spark-cluster.cue b/experimental/addons/spark-kubernetes-operator/definitions/spark-application.cue similarity index 67% rename from experimental/addons/spark-kubernetes-operator/definitions/spark-cluster.cue rename to experimental/addons/spark-kubernetes-operator/definitions/spark-application.cue index 354cd682a..b3f05c3a5 100644 --- a/experimental/addons/spark-kubernetes-operator/definitions/spark-cluster.cue +++ b/experimental/addons/spark-kubernetes-operator/definitions/spark-application.cue @@ -1,7 +1,7 @@ -"spark-cluster": { +"spark-application": { annotations: {} attributes: workload: type: "autodetects.core.oam.dev" - description: "Spark Component." + description: "Describes a containerized spark application that can specify resource spec." labels: {} type: "component" } @@ -32,6 +32,17 @@ template: { driverCores: int // +usage=Specify the number of CPU cores to request for the executor pod executorCores: int + // +usage=Specify a list of arguments to be passed to the application + arguments ?: [...string] + // +usage=Specify the config information carries user-specified Spark configuration properties as they would use the "--conf" option in spark-submit + sparkConf ?: [string]: string + // +usage=Specify the config information 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 configuration properties + hadoopConf ?: [string]: string + // +usage=Specify the name of the ConfigMap containing Spark configuration files such as log4j.properties. The controller will add environment variable SPARK_CONF_DIR to the path where the ConfigMap is mounted to + sparkConfigMap ?: string + // +usage=Specify the name of the ConfigMap containing Hadoop configuration files such as core-site.xml. The controller will add environment variable HADOOP_CONF_DIR to the path where the ConfigMap is mounted to + hadoopConfigMap ?: string + } output: {