|
15 | 15 |
|
16 | 16 | .Procedure
|
17 | 17 |
|
18 |
| -. Create a ConfigMap that mounts the `storage.conf` file for all user workspaces. |
19 |
| -+ |
20 |
| -==== |
21 |
| -[source,yaml,subs="+quotes,+attributes"] |
22 |
| ----- |
23 |
| -kind: ConfigMap |
24 |
| -apiVersion: v1 |
25 |
| -metadata: |
26 |
| - name: fuse-overlay |
27 |
| - namespace: {prod-namespace} |
28 |
| - labels: |
29 |
| - app.kubernetes.io/part-of: che.eclipse.org |
30 |
| - app.kubernetes.io/component: workspaces-config |
31 |
| - annotations: |
32 |
| - controller.devfile.io/mount-as: subpath |
33 |
| - controller.devfile.io/mount-path: /home/user/.config/containers/ |
34 |
| -data: |
35 |
| - storage.conf: | |
36 |
| - [storage] |
37 |
| - driver = "overlay" |
38 |
| -
|
39 |
| - [storage.options.overlay] |
40 |
| - mount_program="/usr/bin/fuse-overlayfs" |
41 |
| ----- |
42 |
| -==== |
43 |
| -+ |
44 |
| -WARNING: Creating this ConfigMap will cause all running workspaces to restart. |
45 |
| - |
46 | 18 | . Set the necessary annotation in the `spec.devEnvironments.workspacesPodAnnotations` field of the CheCluster custom resource.
|
47 | 19 | +
|
48 | 20 | ====
|
|
62 | 34 | For OpenShift versions before 4.15, the `io.openshift.podman-fuse: ""` annotation is also required.
|
63 | 35 | ====
|
64 | 36 |
|
| 37 | ++ |
| 38 | +[NOTE] |
| 39 | +==== |
| 40 | +The Universal Development Image (UDI) includes the following logic in the entrypoint script to detect fuse-overlayfs and set the storage driver. |
| 41 | +If you use a custom image, you should add an equivalent logic the image's entrypoint. |
| 42 | +
|
| 43 | +[bash,subs="verbatim",options="nowrap"] |
| 44 | +---- |
| 45 | +if [ ! -d "${HOME}/.config/containers" ]; then |
| 46 | + mkdir -p ${HOME}/.config/containers |
| 47 | + if [ -c "/dev/fuse" ] && [ -f "/usr/bin/fuse-overlayfs" ]; then |
| 48 | + (echo '[storage]';echo 'driver = "overlay"';echo '[storage.options.overlay]';echo 'mount_program = "/usr/bin/fuse-overlayfs"') > ${HOME}/.config/containers/storage.conf |
| 49 | + else |
| 50 | + (echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf |
| 51 | + fi |
| 52 | +fi |
| 53 | +---- |
| 54 | +==== |
| 55 | + |
65 | 56 | .Verification steps
|
66 | 57 |
|
67 | 58 | . Start a workspace and verify that the storage driver is `overlay`.
|
|
0 commit comments