Skip to content

Google Cloud Storage (GCS) pools ​

Create a private GCS bucket and grant Arka object read, write, list, and delete permissions (for example Storage Object Admin on the target bucket). Arka stores immutable blobs under <prefix>/blobs/<shard>/<shard>/<sha256> (with generation suffixes for isolated GC) and stages resumable multi-part uploads under <prefix>/uploads/. The connectivity test writes and removes a small object under .arka-health/.

bash
# Supply ARKA_GCS_SERVICE_ACCOUNT_JSON through the deployment secret mechanism
# (or omit --gcs-auth-mode to use Application Default Credentials / Workload Identity).
arkactl pools create artifacts-gcs --driver gcs --gcs-auth-mode service_account_json \
  --bucket arka-artifacts-prod --prefix production
arkactl pools test "$POOL_ID"
  • adc is the default authentication mode. It uses GOOGLE_APPLICATION_CREDENTIALS or the GCE/GKE Workload Identity metadata server and is restricted to official Google Cloud Storage endpoints (storage.googleapis.com / www.googleapis.com) to prevent credential exfiltration.
  • service_account_json reads ARKA_GCS_SERVICE_ACCOUNT_JSON on create and encrypts the key in PostgreSQL with Arka's versioned AES-256-GCM credential envelope. Rotate it with arkactl pools update "$POOL_ID" --replace-gcs-key (leaving the key omitted on ordinary updates preserves the stored secret).
  • anonymous is permitted only against loopback HTTP emulators (http://127.0.0.1:<port> / http://localhost:<port>, such as fake-gcs-server) and fails closed outside loopback.
  • --endpoint and --public-endpoint require ASCII/Punycode hostnames and HTTPS outside loopback.

The administration API uses driver: "gcs" and accepts bucket, prefix, endpoint, publicEndpoint, authMode, and write-only serviceAccountJson. Read responses redact secrets (hasServiceAccountJson) and report explicit capabilities:

  • capabilities.uploadStaging: true — supports cross-replica OCI chunked upload staging, SHA-256 verified commit, and quiet-period cleanup of expired upload sessions.
  • capabilities.generationCleanup: true — paginated generation enumeration with cycle detection sweeps unreferenced blob generations while respecting write-intent leases and unified GCS/S3-interop backend_identity locks (so a native gcs pool and an s3-compatibility pool targeting the same storage.googleapis.com bucket never reclaim each other's live objects).
  • capabilities.presignedDownload: true for service_account_json pools when Arka's presigned redirect policy is enabled (generating GCS V4 Signed URLs against publicEndpoint, defaulting to https://storage.googleapis.com); false for adc and anonymous pools.

For an initial default pool, set ARKA_STORAGE_DRIVER=gcs, ARKA_GCS_BUCKET, and optional ARKA_GCS_AUTH_MODE, ARKA_GCS_PREFIX, ARKA_GCS_ENDPOINT, ARKA_GCS_PUBLIC_ENDPOINT, and ARKA_GCS_SERVICE_ACCOUNT_JSON.

Released under the Apache 2.0 License.