Skip to content

Commit 7aa7bee

Browse files
Update fuse docs for Podman 5.x (#2859)
* feat: update fuse docs for Podman 5.x Signed-off-by: dkwon17 <dakwon@redhat.com> * Address PR feedback Signed-off-by: dkwon17 <dakwon@redhat.com> * Update modules/administration-guide/pages/enabling-fuse-for-all-workspaces.adoc Co-authored-by: Jana Vrbkova <jvrbkova@redhat.com> * Update modules/administration-guide/pages/enabling-fuse-for-all-workspaces.adoc Co-authored-by: Jana Vrbkova <jvrbkova@redhat.com> * Update modules/administration-guide/pages/enabling-fuse-for-all-workspaces.adoc Co-authored-by: Jana Vrbkova <jvrbkova@redhat.com> * Mention Podman 5.x requirement Signed-off-by: dkwon17 <dakwon@redhat.com> * Update modules/administration-guide/pages/enabling-fuse-for-all-workspaces.adoc Co-authored-by: Jana Vrbkova <jvrbkova@redhat.com> --------- Signed-off-by: dkwon17 <dakwon@redhat.com> Co-authored-by: Jana Vrbkova <jvrbkova@redhat.com>
1 parent ad29af4 commit 7aa7bee

File tree

1 file changed

+49
-33
lines changed

1 file changed

+49
-33
lines changed

modules/administration-guide/pages/enabling-fuse-for-all-workspaces.adoc

Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,19 @@
77
[id="enabling-fuse-overlayfs-for-all-workspaces"]
88
= Enabling fuse-overlayfs for all workspaces
99

10+
Learn about configuring the workspace's container entrypoint script so that fuse-overlayfs is used for all workspaces using that container.
11+
12+
The Universal Developer Image (UDI) already contains the necessary configuration by default.
13+
However, you must configure the script manually if you use custom images due to Podman 5.x requiring the `/home/user/.config` folder to be owned by the current user.
14+
1015
.Prerequisites
1116

12-
* The xref:administration-guide:enabling-access-to-dev-fuse-for-openshift.adoc[] section has been completed. This is not required for OpenShift versions 4.15 and later.
17+
* For OpenShift versions 4.14 and lower, the xref:administration-guide:enabling-access-to-dev-fuse-for-openshift.adoc[] section has been completed.
1318

1419
* An active `{orch-cli}` session with administrative permissions to the destination OpenShift cluster. See {orch-cli-link}.
1520

1621
.Procedure
1722

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-
4623
. Set the necessary annotation in the `spec.devEnvironments.workspacesPodAnnotations` field of the CheCluster custom resource.
4724
+
4825
====
@@ -59,12 +36,51 @@ spec:
5936
+
6037
[NOTE]
6138
====
62-
For OpenShift versions before 4.15, the `io.openshift.podman-fuse: ""` annotation is also required.
39+
For OpenShift versions 4.14 and lower, the `io.openshift.podman-fuse: ""` annotation is also required.
40+
====
41+
42+
. Optional: If you are using a custom image for the workspace container, create the `/home/user/.config` folder and configure the `storage.conf` file on runtime via the entrypoint.
43+
To do this, add the following to the workspace container image's entrypoint script before building the image.
44+
Creating the `/home/user/.config` folder in the entrypoint results in the folder being owned by the current user which is not known at image build time.
45+
+
46+
====
47+
[source,subs="+quotes,+macros"]
48+
----
49+
# Configure container builds to use vfs or fuse-overlayfs
50+
if [ ! -d "${HOME}/.config/containers" ]; then
51+
mkdir -p ${HOME}/.config/containers
52+
if [ -c "/dev/fuse" ] && [ -f "/usr/bin/fuse-overlayfs" ]; then
53+
(echo '[storage]';echo 'driver = "overlay"';echo '[storage.options.overlay]';echo 'mount_program = "/usr/bin/fuse-overlayfs"') > ${HOME}/.config/containers/storage.conf
54+
else
55+
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf
56+
fi
57+
fi
58+
----
6359
====
60+
+
61+
This ensures that if the `/home/user/.config` doesn't already exist, the folder is created and owned by `user`.
62+
The `/home/user/.config` may already exist for example, if it was stored in a persistent volume.
63+
+
6464

6565
.Verification steps
6666

67-
. Start a workspace and verify that the storage driver is `overlay`.
67+
. Start a workspace and verify that the owner for `/home/user/.config` is `user`.
68+
+
69+
[subs="+attributes,+quotes"]
70+
----
71+
$ ls -la /home/user
72+
----
73+
74+
+
75+
Example output:
76+
+
77+
[subs="+attributes,+quotes"]
78+
----
79+
...
80+
drwxrwsr-x. 3 user 1000660000 24 Dec 24 15:40 .config
81+
----
82+
83+
. Verify that the storage driver is `overlay`.
6884
+
6985
[subs="+attributes,+quotes"]
7086
----
@@ -79,8 +95,8 @@ Example output:
7995
graphDriverName: overlay
8096
overlay.mount_program:
8197
Executable: /usr/bin/fuse-overlayfs
82-
Package: fuse-overlayfs-1.12-1.module+el8.9.0+20326+387084d0.x86_64
83-
fuse-overlayfs: version 1.12
98+
Package: fuse-overlayfs-1.14-1.el9.x86_64
99+
fuse-overlayfs: version 1.13-dev
84100
Backing Filesystem: overlayfs
85101
----
86102
+

0 commit comments

Comments
 (0)