From dbef55cea3b9592f70bb10433ccd82345f8f40ac Mon Sep 17 00:00:00 2001 From: Armand LEOPOLD Date: Tue, 17 May 2022 10:53:20 +0200 Subject: [PATCH] add variabilisation root copy ssh keys --- charts/jupyterlab/Chart.yaml | 2 +- charts/jupyterlab/templates/statefulset.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/jupyterlab/Chart.yaml b/charts/jupyterlab/Chart.yaml index 6f1557f..979a1e4 100644 --- a/charts/jupyterlab/Chart.yaml +++ b/charts/jupyterlab/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: jupyterlab appVersion: "jupyter/datascience-notebook:python-3.9.6" -version: "0.1.3" +version: "0.1.4" description: jupyterlab data science notebook home: https://github.com/curie-data-factory/helm-charts/tree/master/charts/jupyterlab icon: https://jupyter.org/assets/homepage/main-logo.svg diff --git a/charts/jupyterlab/templates/statefulset.yaml b/charts/jupyterlab/templates/statefulset.yaml index ca38133..f8eb64d 100644 --- a/charts/jupyterlab/templates/statefulset.yaml +++ b/charts/jupyterlab/templates/statefulset.yaml @@ -52,10 +52,16 @@ spec: --allow-root' {{- else }} args: + {{- if .Values.root }} + - /bin/bash + - -c + - 'cp -r /home/jovyan/work/.ssh /root/ 2>/dev/null || : && jupyter lab --notebook-dir=/home/jovyan/work --ip 0.0.0.0 --no-browser --allow-root' + {{- else }} - /bin/bash - -c - 'cp -r /home/jovyan/work/.ssh /home/jovyan/ 2>/dev/null || : && jupyter lab --notebook-dir=/home/jovyan/work --ip 0.0.0.0 --no-browser --allow-root' {{- end }} + {{- end }} ports: - containerPort: {{ .Values.service.targetPort }} name: {{ .Values.service.targetPort }}{{ .Values.service.protocol | lower }}