diff --git a/charts/vscode-pyspark/Chart.yaml b/charts/vscode-pyspark/Chart.yaml index 558a5bc4d..742c9cf6a 100644 --- a/charts/vscode-pyspark/Chart.yaml +++ b/charts/vscode-pyspark/Chart.yaml @@ -24,7 +24,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.3.23 +version: 2.4.0 dependencies: - name: library-chart version: 1.7.14 diff --git a/charts/vscode-pyspark/templates/statefulset.yaml b/charts/vscode-pyspark/templates/statefulset.yaml index 7edb59bab..8a94de46c 100644 --- a/charts/vscode-pyspark/templates/statefulset.yaml +++ b/charts/vscode-pyspark/templates/statefulset.yaml @@ -218,7 +218,11 @@ spec: image: "{{ .Values.service.image.version }}" {{- end }} command: ["/bin/sh","-c"] + {{- if .Values.git.asCodeServerRoot }} + args: ["{{ .Values.init.standardInitPath }} /usr/bin/code-server --host 0.0.0.0 /home/{{ .Values.environment.user }}/work/$(basename $GIT_REPOSITORY)"] + {{- else }} args: ["{{ .Values.init.standardInitPath }} /usr/bin/code-server --host 0.0.0.0 /home/{{ .Values.environment.user }}/work"] + {{- end }} imagePullPolicy: {{ .Values.service.image.pullPolicy }} env: - name: KUBERNETES_POD_NAME diff --git a/charts/vscode-pyspark/values.schema.json b/charts/vscode-pyspark/values.schema.json index a5ee5ce94..89a85a797 100644 --- a/charts/vscode-pyspark/values.schema.json +++ b/charts/vscode-pyspark/values.schema.json @@ -566,6 +566,16 @@ "path": "enabled", "isPathRelative": true } + }, + "asCodeServerRoot": { + "title": "Open the service in the clone folder", + "type": "boolean", + "default": false, + "hidden": { + "value": false, + "path": "enabled", + "isPathRelative": true + } } } }, diff --git a/charts/vscode-pyspark/values.yaml b/charts/vscode-pyspark/values.yaml index 1d683c885..919de9d1a 100644 --- a/charts/vscode-pyspark/values.yaml +++ b/charts/vscode-pyspark/values.yaml @@ -98,6 +98,7 @@ git: token: "" repository: "" branch: "" + asCodeServerRoot: false proxy: enabled: false diff --git a/charts/vscode-python/Chart.yaml b/charts/vscode-python/Chart.yaml index de572ab9e..54f58e173 100644 --- a/charts/vscode-python/Chart.yaml +++ b/charts/vscode-python/Chart.yaml @@ -22,7 +22,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.3.24 +version: 2.4.0 dependencies: - name: library-chart version: 1.7.14 diff --git a/charts/vscode-python/templates/statefulset.yaml b/charts/vscode-python/templates/statefulset.yaml index c1c58574a..c3697dc54 100644 --- a/charts/vscode-python/templates/statefulset.yaml +++ b/charts/vscode-python/templates/statefulset.yaml @@ -170,7 +170,11 @@ spec: image: "{{ .Values.service.image.version }}" {{- end }} command: ["/bin/sh","-c"] + {{- if .Values.git.asCodeServerRoot }} + args: ["{{ .Values.init.standardInitPath }} /usr/bin/code-server --host 0.0.0.0 /home/{{ .Values.environment.user }}/work/$(basename $GIT_REPOSITORY)"] + {{- else }} args: ["{{ .Values.init.standardInitPath }} /usr/bin/code-server --host 0.0.0.0 /home/{{ .Values.environment.user }}/work"] + {{- end }} imagePullPolicy: {{ .Values.service.image.pullPolicy }} env: {{- if .Values.init.regionInit }} diff --git a/charts/vscode-python/values.schema.json b/charts/vscode-python/values.schema.json index 7441bcf62..f54db14f1 100644 --- a/charts/vscode-python/values.schema.json +++ b/charts/vscode-python/values.schema.json @@ -571,6 +571,16 @@ "path": "enabled", "isPathRelative": true } + }, + "asCodeServerRoot": { + "title": "Open the service in the clone folder", + "type": "boolean", + "default": false, + "hidden": { + "value": false, + "path": "enabled", + "isPathRelative": true + } } } }, diff --git a/charts/vscode-python/values.yaml b/charts/vscode-python/values.yaml index 44ef17243..1fa30cd53 100644 --- a/charts/vscode-python/values.yaml +++ b/charts/vscode-python/values.yaml @@ -69,6 +69,7 @@ git: email: "" cache: "" branch: "" + asCodeServerRoot: false repository: configMapName: ""