-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path07-spark.yaml
81 lines (81 loc) · 2.61 KB
/
07-spark.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# N.B. config-map simple-hdfs-kerberos is identical to the one deployed by the hdfs cluster (simple-hdfs)
# but with the realm placeholder ${env.KERBEROS_REALM} replaced with CLUSTER.LOCAL. HDFs does this automatically
# but Spark does not.
---
apiVersion: spark.stackable.tech/v1alpha1
kind: SparkApplication
metadata:
name: spark-teragen
spec:
sparkImage:
custom: docker.stackable.tech/stackable/spark-k8s-with-teragen:3.5.0-stackable0.0.0-dev
productVersion: 3.5.0
pullPolicy: IfNotPresent
mode: cluster
mainApplicationFile: local:///tmp/spark-terasort-1.2-SNAPSHOT.jar
mainClass: com.github.ehiggs.spark.terasort.TeraGen
args:
- "10M"
- "hdfs://simple-hdfs/user/stackable/teragen_output"
sparkConf:
"spark.driver.extraClassPath": "/etc/hadoop/conf/:/stackable/spark/extra-jars/*"
"spark.executor.extraClassPath": "/etc/hadoop/conf/:/stackable/spark/extra-jars/*"
"spark.kerberos.keytab": "/stackable/kerberos/keytab"
"spark.kerberos.principal": "testuser/[email protected]"
"spark.driver.extraJavaOptions": "-Djava.security.krb5.conf=/stackable/kerberos/krb5.conf"
"spark.executor.extraJavaOptions": "-Djava.security.krb5.conf=/stackable/kerberos/krb5.conf"
job:
config:
volumeMounts:
# !!! this one is not needed
#- name: hdfs-config
# mountPath: /etc/hadoop/conf
# !!! this one is needed
- name: kerberos
mountPath: /stackable/kerberos
driver:
config:
volumeMounts:
- name: hdfs-config
mountPath: /etc/hadoop/conf
- name: kerberos
mountPath: /stackable/kerberos
resources:
cpu:
min: "1"
max: "2"
memory:
limit: "1Gi"
executor:
replicas: 1
config:
volumeMounts:
- name: hdfs-config
mountPath: /etc/hadoop/conf
- name: kerberos
mountPath: /stackable/kerberos
resources:
cpu:
min: "200m"
max: "4"
memory:
limit: "2Gi"
volumes:
- name: hdfs-config
configMap:
name: simple-hdfs-kerberos
- name: kerberos
ephemeral:
volumeClaimTemplate:
metadata:
annotations:
secrets.stackable.tech/class: kerberos-razvan
secrets.stackable.tech/scope: service=spark-teragen
secrets.stackable.tech/kerberos.service.names: testuser
spec:
storageClassName: secrets.stackable.tech
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "1"