Object Storage
Object Storage provides an S3-compatible API for files, backups, assets, and other unstructured data. It is intended for workloads that need bucket-based object storage instead of a filesystem or relational database.
| Property | Value | Notes |
|---|---|---|
| Provider name | s3 | Use this in landscape provider definitions. |
| Version | v1 | Current schema version exposed by the provider. |
| Category | Storage | Shown in the managed services catalog. |
| Scope | global | Available at team scope rather than being tied to a single workspace runtime. |
| Team singleton | false | Teams can create multiple Object Storage service instances. |
| Pause support | false | This provider does not support pausing. |
Preview Feature
This provider is currently a preview feature. It is not enabled by default and needs to be enabled by your operator. As a preview, the provider is still evolving, its schema, plans, and behavior may change in the future.
Capabilities
The service is highly available: the underlying Ceph storage is set up redundantly and replicated at the storage layer.
No backups yet
Automated backups of the stored data are not yet available for this provider. Until they are, you are responsible for backing up important data yourself.
Schema
Config
| Field | Type | Required on create | Notes |
|---|---|---|---|
accessKey | string | Yes | Cluster-unique access key. Must be exactly 20 uppercase letters or digits. |
userDisplayName | string | No | Default: My S3 User. Friendly label for the generated user. |
initialBucketName | string | Yes | Cluster-unique initial bucket name. If it is already taken, the bucket is not created. |
Secrets
| Field | Type | Required on create | Notes |
|---|---|---|---|
secretKey | string | Yes | Secret access key. Must be exactly 40 alphanumeric characters. |
Details / Output
| Field | Type | Availability | Notes |
|---|---|---|---|
url | string | Exposed after provisioning | S3-compatible endpoint URL. For Codesphere-managed S3, this is always http://rgw-load-balancer.rook-ceph.svc.cluster.local. |
userId | string | Exposed after provisioning | Internal identifier of the generated object-storage user. |
Plan
The provider exposes one plan, Generic (id: 0), which allows all quota parameters to be adjusted.
Example plan: Generic (id: 0).
| Parameter | Type | Default | Minimum | Maximum | Static | Notes |
|---|---|---|---|---|---|---|
maxBuckets | integer | 50 | 1 | 1000 | No | Maximum number of buckets. |
maxObjects | integer | 100000 | 1 | 10000000 | No | Maximum number of objects. |
maxSizeKb | integer | 10000000 | 1 | 10000000000 | No | Total size limit in KB. |
maxReadOpsPerS | integer | 1000 | 1 | 10000 | No | Maximum read operations per second. |
maxWriteOpsPerS | integer | 1000 | 1 | 10000 | No | Maximum write operations per second. |
maxReadBytesPerS | integer | 100000000 | 1 | 10000000000 | No | Maximum read throughput in bytes per second. |
maxWriteBytesPerS | integer | 100000000 | 1 | 10000000000 | No | Maximum write throughput in bytes per second. |
Example in a Landscape
schemaVersion: v0.2
run:
uploads:
provider:
name: s3
version: v1
plan:
id: 0
parameters:
maxBuckets: 50
maxObjects: 100000
maxSizeKb: 10000000
maxReadOpsPerS: 1000
maxWriteOpsPerS: 1000
maxReadBytesPerS: 100000000
maxWriteBytesPerS: 100000000
config:
accessKey: "${{ workspace.env.S3_ACCESS_KEY }}"
userDisplayName: "Landscape Upload User"
initialBucketName: "${{ workspace.env.S3_BUCKET }}"
secrets:
secretKey: "${{ vault.s3SecretKey }}"
Within other runtimes, configure your S3 client with the returned url, the configured accessKey, and the stored secretKey.
For Codesphere-managed S3, the endpoint is always http://rgw-load-balancer.rook-ceph.svc.cluster.local.
The same S3-compatible endpoint is available from other Codesphere runtimes, including reactives, managed containers, and workloads inside a Virtual Cluster.
Connecting to an Object Store
Prerequisites
Once your Object Store is deployed, you can connect to it from your Codesphere workspaces.
Each service lists non-sensitive connection details in their respective settings page, in the overview tab (or in the details property in the public API payload).
info
Before connecting, make sure the service is synchronized.
Connecting via Terminal (mc)
The MinIO Client (mc) is a robust tool for interacting with S3-compatible APIs.
# Install mc
nix-env -iA nixpkgs.minio-client
# Configure alias
mc alias set my-storage http://rgw-load-balancer.rook-ceph.svc.cluster.local "$ACCESS_KEY" "$SECRET_KEY"
# List buckets
mc ls my-storage
# Copy file
mc cp myfile.txt my-storage/my-bucket/
Connecting via Node.js
Using the AWS SDK for JavaScript v3 (@aws-sdk/client-s3):
const { S3 } = require("@aws-sdk/client-s3");
const s3 = new S3({
endpoint: "http://rgw-load-balancer.rook-ceph.svc.cluster.local",
region: "us-east-1",
credentials: {
accessKeyId: "YOUR_ACCESS_KEY",
secretAccessKey: "YOUR_SECRET_KEY"
},
forcePathStyle: true,
tls: false
});
const { Buckets } = await s3.listBuckets({});
console.log(Buckets);