Skip to content

Commit 8cac61b

Browse files
committed
Add a new option to open the service directly in the cloned folder
1 parent 9db9a47 commit 8cac61b

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

charts/vscode-python/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type: application
2222
# This is the chart version. This version number should be incremented each time you make changes
2323
# to the chart and its templates, including the app version.
2424
# Versions are expected to follow Semantic Versioning (https://semver.org/)
25-
version: 2.3.23
25+
version: 2.4.23
2626
dependencies:
2727
- name: library-chart
2828
version: 1.7.14

charts/vscode-python/templates/statefulset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ spec:
170170
image: "{{ .Values.service.image.version }}"
171171
{{- end }}
172172
command: ["/bin/sh","-c"]
173+
{{- if .Values.git.asCodeServerRoot }}
174+
args: ["{{ .Values.init.standardInitPath }} /usr/bin/code-server --host 0.0.0.0 /home/{{ .Values.environment.user }}/work/$(base name "$(ls -d /home/onyxia/work/*/ | head -n 1)")]
175+
{{- else }}
173176
args: ["{{ .Values.init.standardInitPath }} /usr/bin/code-server --host 0.0.0.0 /home/{{ .Values.environment.user }}/work"]
177+
{{- end }}
174178
imagePullPolicy: {{ .Values.service.image.pullPolicy }}
175179
env:
176180
{{- if .Values.init.regionInit }}

charts/vscode-python/values.schema.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,16 @@
571571
"path": "enabled",
572572
"isPathRelative": true
573573
}
574+
},
575+
"asCodeServerRoot": {
576+
"title": "Open the service in the clone folder",
577+
"type": "boolean",
578+
"default": false,
579+
"hidden": {
580+
"value": false,
581+
"path": "enabled",
582+
"isPathRelative": true
583+
}
574584
}
575585
}
576586
},

charts/vscode-python/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ git:
6969
email: ""
7070
cache: ""
7171
branch: ""
72+
asCodeServerRoot: false
7273

7374
repository:
7475
configMapName: ""

0 commit comments

Comments
 (0)