mirror of
https://github.com/distribution/distribution.git
synced 2026-10-28 10:15:27 +08:00
The GCS storage driver parameters table documents `chunksize` as defaulting to 5242880 (5 MiB). The driver does not use that value: `registry/storage/driver/gcs/gcs.go` defines defaultChunkSize = 16 * 1024 * 1024 and applies it when the `chunksize` parameter is absent, so the documented default understates the actual chunk size by a factor of three and a third. Correct the table to 16777216 (16 MiB). Signed-off-by: yuwk <1729065730@qq.com>
2.1 KiB
2.1 KiB
description, keywords, title
| description | keywords | title |
|---|---|---|
| Explains how to use the Google Cloud Storage drivers | registry, service, driver, images, storage, gcs, google, cloud | Google Cloud Storage driver |
An implementation of the storagedriver.StorageDriver interface which uses Google Cloud for object storage.
Parameters
| Parameter | Required | Description |
|---|---|---|
bucket |
yes | The name of your Google Cloud Storage bucket where you wish to store objects (needs to already be created prior to driver initialization). |
keyfile |
no | A private service account key file in JSON format used for Service Account Authentication. |
rootdirectory |
no | The root directory tree in which all registry files are stored. Defaults to the empty string (bucket root). If a prefix is used, the path bucketname/<prefix> has to be pre-created before starting the registry. The prefix is applied to all Google Cloud Storage keys to allow you to segment data in your bucket if necessary. |
chunksize |
no (default 16777216) | This is the chunk size used for uploading large blobs, must be a multiple of 256*1024. |
{{< hint type=note >}} Instead of a key file you can use Google Application Default Credentials.
To use redirects with default credentials assigned to a virtual machine you have to enable "IAM Service Account Credentials API" and grant iam.serviceAccounts.signBlob permission on the used service account.
To use redirects with default credentials from Google Cloud CLI, in addition to the permissions mentioned above, you have to impersonate the service account intended to be used by the registry. {{< /hint >}}