mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-25 04:56:18 +10:00
added abitlity to mount extra volumes in spark workers
This commit is contained in:
@@ -99,11 +99,23 @@ imagePullSecrets:
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/* Validate values of Spark - Incorrect extra volume settings */}}
|
||||
{{- define "spark.validateValues.extraVolumes" -}}
|
||||
{{- if and (.Values.worker.extraVolumes) (not .Values.worker.extraVolumeMounts) -}}
|
||||
spark: missing-worker-extra-volume-mounts
|
||||
You specified worker extra volumes but not mount points for them. Please set
|
||||
the extraVolumeMounts value
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Compile all warnings into a single message, and call fail.
|
||||
*/}}
|
||||
{{- define "spark.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "spark.validateValues.extraVolumes" .) -}}
|
||||
{{- $messages := append $messages (include "spark.validateValues.workerCount" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
@@ -52,6 +52,9 @@ spec:
|
||||
mountPath: '/opt/bitnami/spark/conf/certs'
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.worker.extraVolumeMounts }}
|
||||
{{- tpl (toYaml .Values.worker.extraVolumeMounts) $ | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: SPARK_MODE
|
||||
value: "worker"
|
||||
@@ -173,3 +176,6 @@ spec:
|
||||
secret:
|
||||
secretName: {{ .Values.security.certificatesSecretName }}
|
||||
{{- end }}
|
||||
{{- if .Values.worker.extraVolumes }}
|
||||
{{- tpl (toYaml .Values.worker.extraVolumes) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -233,6 +233,14 @@ worker:
|
||||
## Max number of workers when using autoscaling
|
||||
replicasMax: 5
|
||||
|
||||
## Array to add extra volumes
|
||||
##
|
||||
## extraVolumes:
|
||||
|
||||
## Array to add extra mounts (normally used with extraVolumes)
|
||||
##
|
||||
## extraVolumeMounts: {}
|
||||
|
||||
## Security configuration
|
||||
##
|
||||
security:
|
||||
|
||||
Reference in New Issue
Block a user