Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions charts/livy/livy-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,10 @@ Used as value of "livy.server.kubernetes.userSecretPattern" option of livy.conf.
{{- define "livy-chart.userSecretPattern" -}}
{{- printf "%s-user-secret-%%s" .Release.Name -}}
{{- end }}

{{/*
The name of the PVC that would be used for spark.kubernetes.file.upload.path
*/}}
{{- define "livy.sparkFileUploadPvcName" -}}
{{- default (printf "%s-spark-file-upload" (include "livy.fullname" .)) .Values.sparkFileUploadVolume.pvcname | trunc 63 | trimSuffix "-" }}
{{- end }}
9 changes: 6 additions & 3 deletions charts/livy/livy-chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ data:
livy.conf: |
# Environment variables here would be replaced by its values
livy.repl.enable-hive-context = true
livy.repl.jars = local:///opt/mapr/livy/repl-jars/commons-codec,local:///opt/mapr/livy/repl-jars/livy-core_2.12.jar,local:///opt/mapr/livy/repl-jars/livy-repl_2.12.jar
livy.rsc.jars = local:///opt/mapr/livy/rsc-jars/livy-api.jar,local:///opt/mapr/livy/rsc-jars/livy-rsc.jar,local:///opt/mapr/livy/rsc-jars/minlog.jar,local:///opt/mapr/livy/rsc-jars/netty-all.jar,local:///opt/mapr/livy/rsc-jars/objenesis.jar,local:///opt/mapr/livy/rsc-jars/reflectasm.jar
livy.rsc.pyspark.archives = local:///opt/mapr/spark/pyspark-archives/pyspark.zip,local:///opt/mapr/spark/pyspark-archives/py4j-src.zip
{{- if eq .Values.sessionRecovery.kind "zookeeper" }}
livy.server.recovery.mode = recovery
livy.server.recovery.state-store = zookeeper
Expand Down Expand Up @@ -49,6 +46,8 @@ data:
livy.server.kubernetes.namespacePattern = {{ .Values.autosetNamespace.namespacePattern }}
livy.server.kubernetes.driverSaPattern = {{ .Values.autosetNamespace.driverSaPattern }}
livy.server.kubernetes.executorSaPattern = {{ .Values.autosetNamespace.executorSaPattern }}
livy.server.kubernetes.fileUploadVolume.create = true
livy.server.kubernetes.fileUploadVolume.sourcePvc = livy-jars-pvc
{{- end }}

spark-blacklist.conf: |
Expand Down Expand Up @@ -85,3 +84,7 @@ data:
{{- end }}

spark.ssl.enabled false
spark.kubernetes.file.upload.path file:///opt/spark-file-upload
spark.kubernetes.driver.volumes.persistentVolumeClaim.spark-file-upload-volume.options.claimName livy-jars-pvc
spark.kubernetes.driver.volumes.persistentVolumeClaim.spark-file-upload-volume.mount.path /opt/spark-file-upload
spark.kubernetes.driver.volumes.persistentVolumeClaim.spark-file-upload-volume.mount.readOnly true
5 changes: 5 additions & 0 deletions charts/livy/livy-chart/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
volumeMounts:
{{- include "livy-chart.volumeMounts" . | nindent 12 }}
- name: livy-jars
mountPath: /opt/spark-file-upload
volumes:
{{- include "livy-chart.volumes" . | nindent 8 }}
name: livy-jars
- persistentVolumeClaim:
claimName: livy-jars-pvc
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumeClaimTemplates:
Expand Down
5 changes: 5 additions & 0 deletions charts/livy/livy-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,10 @@ istio:
authPolicy:
create: false

# Livy needs to have shared volume to upload its JARs into Spark Appication pods
sparkFileUploadVolume:
createpvc: true
# Leave the following propery empty to generate PVC name automatically
pvcname: ""
# Add custom labels to livy server pod
customLabels: