Mounting a bucket to a container
Note
This feature is in the Preview stage. You can only mount a read-only bucket by default. To mount a bucket with write permissions, contact tech support
Mounting buckets allows you to access them through the file system interface. In the container revision settings, the user can specify one or more mount paths. Use this path to access the directory in which the bucket is mounted. Do not use this path for anything other than an empty directory; otherwise, the container initialization may result in an error, and the mounted buckets will become unavailable.
You can mount the whole bucket or a specific folder.
The /run/storage_sync_socket
path is reserved for the Unix socket. To avoid loss of information when reading/writing data from/to the bucket:
- Do not put anything in the Unix socket path destination.
- Do not read from the Unix socket or write to it.
Roles required to mount a bucket
To mount a bucket, the service account needs the following roles:
storage.viewer
to only read data from the bucket.storage.uploader
to both read and write bucket data.