Enabling fuse-overlayfs for all workspaces
-
The Enabling container access to /dev/fuse for OpenShift older than 4.15 section has been completed. This is not required for OpenShift versions 4.15 and later.
-
An active
kubectl
session with administrative permissions to the destination OpenShift cluster. See Overview of kubectl.
-
Create a ConfigMap that mounts the
storage.conf
file for all user workspaces.kind: ConfigMap apiVersion: v1 metadata: name: fuse-overlay namespace: eclipse-che labels: app.kubernetes.io/part-of: che.eclipse.org app.kubernetes.io/component: workspaces-config annotations: controller.devfile.io/mount-as: subpath controller.devfile.io/mount-path: /home/user/.config/containers/ data: storage.conf: | [storage] driver = "overlay" [storage.options.overlay] mount_program="/usr/bin/fuse-overlayfs"
Creating this ConfigMap will cause all running workspaces to restart. -
Set the necessary annotation in the
spec.devEnvironments.workspacesPodAnnotations
field of the CheCluster custom resource.kind: CheCluster apiVersion: org.eclipse.che/v2 spec: devEnvironments: workspacesPodAnnotations: io.kubernetes.cri-o.Devices: /dev/fuse
For OpenShift versions before 4.15, the
io.openshift.podman-fuse: ""
annotation is also required.
-
Start a workspace and verify that the storage driver is
overlay
.$ podman info | grep overlay
Example output:
graphDriverName: overlay overlay.mount_program: Executable: /usr/bin/fuse-overlayfs Package: fuse-overlayfs-1.12-1.module+el8.9.0+20326+387084d0.x86_64 fuse-overlayfs: version 1.12 Backing Filesystem: overlayfs
The following error might occur for existing workspaces:
ERRO[0000] User-selected graph driver "overlay" overwritten by graph driver "vfs" from database - delete libpod local files ("/home/user/.local/share/containers/storage") to resolve. May prevent use of images created by other tools
In this case, delete the libpod local files as mentioned in the error message.