Skip to content

Allow chroot directory to pre-exist for volume mount support#3967

Merged
rockwotj merged 2 commits intomainfrom
jb/chroot-volume-mount-support
Feb 5, 2026
Merged

Allow chroot directory to pre-exist for volume mount support#3967
rockwotj merged 2 commits intomainfrom
jb/chroot-volume-mount-support

Conversation

@birdayz
Copy link
Contributor

@birdayz birdayz commented Feb 5, 2026

The chroot setup previously required the chroot directory to not exist, which prevented mounting ConfigMaps or other volumes directly inside the chroot path. This is a problem because the chroot-passthrough mechanism copies files (losing symlinks), which breaks fsnotify-based hot reload of authorization policy files mounted from ConfigMaps.

Allow the chroot directory to pre-exist so that Kubernetes volume mounts can place files directly inside it. Also handle EROFS errors in the makeReadOnly step, since read-only volume mounts (like ConfigMaps) cannot be chmod'd.

Pre-create /tmp/chroot in the cloud Dockerfile owned by the connect user so the process can populate the rest of the chroot structure at runtime.

Add integration tests covering hierarchical authz scope matching with production-like resource names and policy bindings.

The chroot setup previously required the chroot directory to not exist,
which prevented mounting ConfigMaps or other volumes directly inside the
chroot path. This is a problem because the chroot-passthrough mechanism
copies files (losing symlinks), which breaks fsnotify-based hot reload
of authorization policy files mounted from ConfigMaps.

Allow the chroot directory to pre-exist so that Kubernetes volume mounts
can place files directly inside it. Also handle EROFS errors in the
makeReadOnly step, since read-only volume mounts (like ConfigMaps) cannot
be chmod'd.

Pre-create /tmp/chroot in the cloud Dockerfile owned by the connect user
so the process can populate the rest of the chroot structure at runtime.
@birdayz birdayz force-pushed the jb/chroot-volume-mount-support branch from 0acb24d to b1ad35b Compare February 5, 2026 21:05
@birdayz birdayz marked this pull request as ready for review February 5, 2026 21:06
@rockwotj
Copy link
Contributor

rockwotj commented Feb 5, 2026

cc: @wreet @d3k4z @mmatczuk

@rockwotj rockwotj merged commit 7155d04 into main Feb 5, 2026
5 checks passed
@rockwotj rockwotj deleted the jb/chroot-volume-mount-support branch February 5, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants