File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 77
77
echo "Gitpod: Generate the base Installer config"
78
78
/app/installer init > "${CONFIG_FILE}"
79
79
80
+ echo "Gitpod: auto-detecting ShiftFS support on host machine"
81
+ kubectl wait job -n {{repl Namespace }} --for=condition=complete -l component=shiftfs-module-loader --timeout=30s || true
82
+ ENABLE_SHIFTFS=$(kubectl get jobs.batch -n {{repl Namespace }} -l component=shiftfs-module-loader -o jsonpath='{.items[0].status.succeeded}')
83
+
84
+ if [ "${ENABLE_SHIFTFS}" = "1" ]; then
85
+ echo "Gitpod: enabling ShiftFS support"
86
+
87
+ yq e -i '.workspace.runtime.fsShiftMethod = "shiftfs"' "${CONFIG_FILE}"
88
+ fi
89
+
80
90
echo "Gitpod: auto-detecting containerd location on host machine"
81
91
if [ -d "/mnt/node0${CONTAINERD_DIR_K3S}" ]; then
82
92
echo "Gitpod: containerd dir detected as k3s"
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2
+ # Licensed under the MIT License. See License-MIT.txt in the project root for license information.
3
+
4
+ # This job is allowed to fail as will default to fuse
5
+ apiVersion : batch/v1
6
+ kind : Job
7
+ metadata :
8
+ name : shiftfs-module-loader-{{repl Cursor }}
9
+ labels :
10
+ app : gitpod
11
+ component : shiftfs-module-loader
12
+ spec :
13
+ ttlSecondsAfterFinished : 60
14
+ activeDeadlineSeconds : 30
15
+ backoffLimit : 1
16
+ parallelism : 1
17
+ template :
18
+ metadata :
19
+ labels :
20
+ app : gitpod
21
+ component : shiftfs-module-loader
22
+ spec :
23
+ serviceAccountName : installer
24
+ restartPolicy : Never
25
+ containers :
26
+ - name : shiftfs-module-loader
27
+ # This is the current valid tag. This will be auto-updated by the Werft job
28
+ image : eu.gcr.io/gitpod-core-dev/build/shiftfs-module-loader:commit-ab235e8bc00f2c1ac70232cea17e5df9a9d262fa
29
+ securityContext :
30
+ privileged : true
31
+ volumeMounts :
32
+ - mountPath : /usr/src_node
33
+ name : node-linux-src
34
+ readOnly : true
35
+ volumes :
36
+ - name : node-linux-src
37
+ hostPath :
38
+ path : /usr/src
39
+ type : Directory
You can’t perform that action at this time.
0 commit comments