volcano.sh/volcano@v1.9.0/example/kubecon-2019-china/spark-sample/spark-pi.yaml (about)

     1  #
     2  # Copyright 2017 Google LLC
     3  #
     4  # Licensed under the Apache License, Version 2.0 (the "License");
     5  # you may not use this file except in compliance with the License.
     6  # You may obtain a copy of the License at
     7  #
     8  #     https://www.apache.org/licenses/LICENSE-2.0
     9  #
    10  # Unless required by applicable law or agreed to in writing, software
    11  # distributed under the License is distributed on an "AS IS" BASIS,
    12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  # See the License for the specific language governing permissions and
    14  # limitations under the License.
    15  
    16  apiVersion: "sparkoperator.k8s.io/v1beta1"
    17  kind: SparkApplication
    18  metadata:
    19    name: spark-pi
    20    namespace: default
    21  spec:
    22    type: Scala
    23    mode: cluster
    24    image: "volcanosh/spark:v2.4.0"
    25    imagePullPolicy: Always
    26    mainClass: org.apache.spark.examples.SparkPi
    27    mainApplicationFile: "local:///opt/spark/examples/jars/spark-examples_2.11-2.4.0.jar"
    28    sparkVersion: "2.4.0"
    29    imagePullSecrets:
    30      - default-secret
    31    restartPolicy:
    32      type: Never
    33    volumes:
    34      - name: "test-volume"
    35        hostPath:
    36          path: "/tmp"
    37          type: Directory
    38    driver:
    39      schedulerName: volcano
    40      cores: 0.1
    41      coreLimit: "200m"
    42      memory: "512m"
    43      labels:
    44        version: 2.4.0
    45      serviceAccount: spark-operator-sparkoperator
    46      volumeMounts:
    47        - name: "test-volume"
    48          mountPath: "/tmp"
    49    executor:
    50      annotations:
    51        scheduling.k8s.io/group-name: spark-pi-group
    52      schedulerName: volcano
    53      cores: 1
    54      instances: 15
    55      memory: "512m"
    56      labels:
    57        version: 2.4.0
    58      volumeMounts:
    59        - name: "test-volume"
    60          mountPath: "/tmp"
    61  ---
    62  apiVersion: scheduling.incubator.k8s.io/v1alpha1
    63  kind: PodGroup
    64  metadata:
    65    name: spark-pi-group
    66  spec:
    67    minMember: 3
    68  
    69