apiVersion: "sparkoperator.hpe.com/v1beta2"
kind: SparkApplication
metadata:
  name: spark-pi-{{ts_nodash|replace("T", "")}}
spec:
  type: Scala
  sparkVersion: 3.5.5
  mode: cluster
  image: '{{dag_run.conf["registry_url"]}}hpe-spark/spark:v3.5.5.2.6'
  imagePullPolicy: Always
  mainClass: org.apache.spark.examples.SparkPi
  mainApplicationFile: "local:///mounts/shared-volume/shared/aie-tutorials/current-release/Data-Analytics/Spark/pi/pi.py"
  restartPolicy:
    type: Never
  driver:
    cores: 1
    coreLimit: "1000m"
    memory: "512m"
    labels:
      version: 3.5.5
    volumeMounts:
      - name: shared-volume
        mountPath: /mounts/shared-volume/shared
  executor:
    cores: 1
    instances: 2
    coreLimit: "1000m"
    memory: "512m"
    labels:
      version: 3.5.5
    volumeMounts:
      - name: shared-volume
        mountPath: /mounts/shared-volume/shared
    volumes:
      - name: shared-volume
        persistentVolumeClaim:
          claimName: kubeflow-shared-pvc
