Customizable Google Cloud Storage API Endpoint for Caching
Feature Request: Allow customization of the Google Cloud Storage (GCS) API endpoint for job caching.
When using Google Cloud Storage as the cache mechanism for GitLab Runner jobs, the runner currently defaults to the standard GCS API endpoint (storage.googleapis.com). For users operating within specific environments, such as the s3ns platform (which is an environment related to Google Cloud/Storage, often for specific regulatory or regional purposes), a different endpoint is required: storage.s3nsapis.fr.
The GitLab Runner configuration should allow users to specify a custom GCS API endpoint (similar to how the S3 driver allows s3_api_endpoint), enabling compatibility with services like s3ns.
Current Behavior
- The GitLab Runner GCS cache configuration uses a hardcoded or non-configurable API endpoint:
storage.googleapis.com. - This prevents users of platforms like s3ns from utilizing the caching mechanism because the runners attempt to communicate with the wrong storage endpoint.
Expected Behavior
- A new configuration option should be introduced in the
[[runners]]section under the[runners.cache.gcs]sub-section. - This option, perhaps named
gcs_api_endpoint(or similar), would allow users to override the default GCS API endpoint.
Proposal/Suggested Configuration Change
We propose adding a new optional setting to the [[runners]] configuration:
[[runners]]
# ... other runner configuration
[runners.cache]
Type = "gcs"
Shared = true
# ... other cache settings
[runners.cache.gcs]
BucketName = "your-cache-bucket"
# ... other gcs settings
# New proposed setting:
# Optional: Custom GCS API endpoint. Defaults to storage.googleapis.com
GcsApiEndpoint = "storage.s3nsapis.fr"
Impact
- This feature would immediately enable s3ns platform users to leverage the GitLab Runner caching mechanism with their existing infrastructure.
- It improves the flexibility and compatibility of the GCS cache driver with specific Google Cloud environments or GCS-compatible private/regional cloud storage solutions that require a distinct endpoint.