github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/jupyter-notebook/templates/deployment.yaml (about) 1 apiVersion: apps/v1 2 kind: Deployment 3 metadata: 4 name: {{ include "jupyter.fullname" . }} 5 labels: 6 {{- include "jupyter.labels" . | nindent 4 }} 7 spec: 8 replicas: {{ .Values.replicaCount }} 9 selector: 10 matchLabels: 11 {{- include "jupyter.selectorLabels" . | nindent 6 }} 12 template: 13 metadata: 14 labels: 15 {{- include "jupyter.selectorLabels" . | nindent 8 }} 16 spec: 17 initContainers: 18 - name: init-container 19 image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ default .Values.image.tag }} 20 command: 21 - /bin/sh 22 - -c 23 - | 24 cp /tmp/docs-QA-assistantor.ipynb /home/jovyan/work 25 chmod 777 /home/jovyan/work/docs-QA-assistantor.ipynb 26 volumeMounts: 27 - name: data-volume 28 mountPath: /home/jovyan/work 29 containers: 30 - name: {{ .Chart.Name }} 31 image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ default .Values.image.tag }} 32 imagePullPolicy: {{ .Values.image.pullPolicy }} 33 ports: 34 - name: http 35 containerPort: {{ .Values.service.port }} 36 protocol: TCP 37 resources: 38 {{- toYaml .Values.resources | nindent 12 }} 39 volumeMounts: 40 - name: data-volume 41 mountPath: /home/jovyan/work 42 env: 43 - name: JUPYTER_PORT 44 value: "{{ .Values.service.port }}" 45 - name: NOTEBOOK_ARGS 46 value: "--NotebookApp.token='' " 47 volumes: 48 - name: data-volume 49 persistentVolumeClaim: 50 claimName: {{ printf "%s-pvc" (include "jupyter.fullname" .) }}