12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- {{- if .Values.jupyterlab.install.enabled }}
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: {{ .Release.Name }}-jupyterlab
- labels:
- tier: aihub-spark
- component: jupyterlab
- release: {{ .Release.Name }}
- spec:
- selector:
- matchLabels:
- tier: aihub-spark
- component: jupyterlab
- release: {{ .Release.Name }}
- template:
- metadata:
- {{- with .Values.jupyterlab.podAnnotations }}
- annotations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- labels:
- tier: aihub-spark
- component: jupyterlab
- release: {{ .Release.Name }}
- date: "{{ now | unixEpoch }}"
- spec:
- {{- with .Values.jupyterlab.imagePullSecrets }}
- imagePullSecrets:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- securityContext:
- {{- toYaml .Values.jupyterlab.podSecurityContext | nindent 8 }}
- containers:
- - name: {{ .Release.Name }}-jupyterlab
- securityContext:
- {{- toYaml .Values.securityContext | nindent 12 }}
- image: "{{ .Values.jupyterlab.image.repository }}:{{ .Values.jupyterlab.image.tag | default .Chart.AppVersion }}"
- imagePullPolicy: {{ .Values.jupyterlab.image.pullPolicy }}
- ports:
- - name: http
- containerPort: 8888
- protocol: TCP
- volumeMounts:
- - name: jupyterlab-data
- mountPath: /workspace
- - name: {{ .Release.Name }}-sparkmagic-config
- mountPath: /root/.sparkmagic/config.json
- subPath: config.json
- - name: {{ .Release.Name }}-jupyterlab-config
- mountPath: /root/.jupyter/jupyter_lab_config.py
- subPath: jupyter_lab_config.py
- resources:
- {{- toYaml .Values.jupyterlab.resources | nindent 12 }}
- volumes:
- - name: {{ .Release.Name }}-sparkmagic-config
- configMap:
- name: {{ .Release.Name }}-sparkmagic-config
- - name: {{ .Release.Name }}-jupyterlab-config
- configMap:
- name: {{ .Release.Name }}-jupyterlab-config
- {{- if .Values.jupyterlab.persistence.enabled }}
- - name: jupyterlab-data
- persistentVolumeClaim:
- claimName: jupyterlab-data
- {{- else }}
- - name: jupyterlab-data
- emptyDir: {}
- {{- end }}
- {{- with .Values.jupyterlab.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.jupyterlab.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.jupyterlab.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- end }}
|