Repository navigation
feat: add generic read-only file mounts for targets - #33
Merged
Merged
Conversation
Lets backends that read secrets or config from files (CA certs, SSH keys, rclone config) get them into movers without putting them in env.
davidborzek
force-pushed
the
feat/target-file-mounts
branch
from
October 13, 2026 20:28
def4a69 to
9a0f102
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Targets get a new
files: [{source, target}]field: each host file is bind-mounted read-only into every mover of that target. Today only the restic password (passwordFile) and AWS credentials (credentialsFile) can reach the mover as files; anything else (CA certificates, SSH keys, known_hosts, rclone config, cloud key files) had to go throughenv, where it is visible viadocker inspector simply doesn't fit. sabon sets no env for these files; the user references the in-mover path fromenvorresticArgs. This is the groundwork for SFTP/rclone-based backends.Validation:
sourcemust be a clean absolute path to a regular file (checked before each run; unclean paths are rejected because Dockerpath.Cleans bind sources, so a symlink before..would otherwise stat one file and mount another).targetmust be absolute, unique, without:, and must not overlap sabon's own mounts (/data,/repo,/cache,/restore,/run/secrets/sabon-*) in either direction. A test keeps the reserved list inapiin sync with the mount constants ininternal/backup.Existing fields are unchanged.
passwordFile/credentialsFileshare the unclean-path quirk; that is left for a separate fix.Checklist
gofmt,go vet ./..., andgo test ./...pass