diff --git a/dask/README.md b/dask/README.md index 017475c..9ec4c1e 100644 --- a/dask/README.md +++ b/dask/README.md @@ -88,6 +88,7 @@ The following table lists the configurable parameters of the Dask chart and thei | `worker.default_resources.memory` | Default memory (deprecated use `resources`). | `"4GiB"` | | `worker.env` | Environment variables. see `values.yaml` for example values. | `null` | | `worker.resources` | Worker pod resources. see `values.yaml` for example values. | `{}` | +| `worker.mounts` | Worker pod volumes and volume mounts, mounts.volumes follows kuberentes api v1 volumes spec. mounts.volumemounts follows kubernetesapi v1 volumemount spec | `{}` | | `worker.tolerations` | Tolerations. | `[]` | | `worker.affinity` | Container affinity. | `{}` | | `worker.nodeSelector` | Node selector. | `{}` | @@ -108,6 +109,7 @@ The following table lists the configurable parameters of the Dask chart and thei | `jupyter.args` | Container arguments. | `null` | | `jupyter.extraConfig` | | `"# Extra Jupyter config goes here\n# E.g\n# c.NotebookApp.port = 8888"` | | `jupyter.resources` | Jupyter pod resources. see `values.yaml` for example values. | `{}` | +| `jupyter.mounts` | Worker pod volumes and volume mounts, mounts.volumes follows kuberentes api v1 volumes spec. mounts.volumemounts follows kubernetesapi v1 volumemount spec | `{}` | | `jupyter.tolerations` | Tolerations. | `[]` | | `jupyter.affinity` | Container affinity. | `{}` | | `jupyter.nodeSelector` | Node selector. | `{}` | diff --git a/dask/templates/dask-jupyter-deployment.yaml b/dask/templates/dask-jupyter-deployment.yaml index a439381..cd2890e 100644 --- a/dask/templates/dask-jupyter-deployment.yaml +++ b/dask/templates/dask-jupyter-deployment.yaml @@ -47,6 +47,9 @@ spec: volumeMounts: - name: config-volume mountPath: /usr/local/etc/jupyter + {{- if .Values.worker.mounts.volumeMounts }} + {{- toYaml .Values.worker.mounts.volumeMounts | nindent 12 }} + {{- end }} env: - name: DASK_SCHEDULER_ADDRESS value: {{ template "dask.fullname" . }}-scheduler:{{ .Values.scheduler.servicePort }} @@ -54,6 +57,9 @@ spec: {{- toYaml .Values.jupyter.env | nindent 12 }} {{- end }} volumes: + {{- if .Values.jupyter.mounts.volumes }} + {{- toYaml .Values.worker.mounts.volumes | nindent 8}} + {{- end }} - name: config-volume configMap: name: {{ template "dask.fullname" . }}-jupyter-config diff --git a/dask/templates/dask-worker-deployment.yaml b/dask/templates/dask-worker-deployment.yaml index 4647a73..6140351 100644 --- a/dask/templates/dask-worker-deployment.yaml +++ b/dask/templates/dask-worker-deployment.yaml @@ -26,6 +26,10 @@ spec: spec: imagePullSecrets: {{- toYaml .Values.worker.image.pullSecrets | nindent 8 }} + {{- if .Values.worker.mounts.volumes }} + volumes: + {{- toYaml .Values.worker.mounts.volumes | nindent 8}} + {{- end }} containers: - name: {{ template "dask.fullname" . }}-worker image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag }}" @@ -50,6 +54,11 @@ spec: {{- toYaml .Values.worker.resources | nindent 12 }} env: {{- toYaml .Values.worker.env | nindent 12 }} + + {{- if .Values.worker.mounts.volumeMounts }} + volumeMounts: + {{- toYaml .Values.worker.mounts.volumeMounts | nindent 12 }} + {{- end }} {{- with .Values.worker.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/dask/values.yaml b/dask/values.yaml index c434984..c8d7322 100644 --- a/dask/values.yaml +++ b/dask/values.yaml @@ -69,6 +69,13 @@ worker: # cpu: 1 # memory: 3G # nvidia.com/gpu: 1 + mounts: {} # Worker Pod volumes and volume mounts, mounts.volumes follows kuberentes api v1 Volumes spec. mounts.volumeMounts follows kubernetesapi v1 VolumeMount spec + # volumes: + # - name: data + # emptyDir: {} + # volumeMounts: + # - name: data + # mountPath: /data tolerations: [] # Tolerations. affinity: {} # Container affinity. nodeSelector: {} # Node Selector. @@ -89,6 +96,7 @@ jupyter: pullPolicy: IfNotPresent # Container image pull policy. pullSecrets: # Container image [pull secrets](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/). # - name: regcred + # replicas: 1 # Number of notebook servers. serviceType: "ClusterIP" # Scheduler service type. Set to `LoadBalancer` to expose outside of your cluster. # serviceType: "NodePort" @@ -117,6 +125,13 @@ jupyter: # requests: # cpu: 2 # memory: 6G + mounts: {} # Worker Pod volumes and volume mounts, mounts.volumes follows kuberentes api v1 Volumes spec. mounts.volumeMounts follows kubernetesapi v1 VolumeMount spec + # volumes: + # - name: data + # emptyDir: {} + # volumeMounts: + # - name: data + # mountPath: /data tolerations: [] # Tolerations. affinity: {} # Container affinity. nodeSelector: {} # Node Selector.