Configuration
The driver needs a read-write cloudscale.ch API token in
CLOUDSCALE_API_TOKEN. Read-only tokens are rejected in effect: cloudscale.ch
omits secret_key from objects user responses for them, and aludel-cloudscale reads the
secret back on every access grant.
Namespaces
Two different secrets are involved, and they live in different places:
| Secret | Namespace | Who creates it |
|---|---|---|
|
|
you, once per cluster |
|
the workload’s namespace, next to its |
the COSI sidecar, per grant |
The token is a cluster-wide credential with full access to every bucket in the cloudscale.ch project, so it stays in the driver’s namespace and is never exposed to consumers. Workloads only ever see the key pair of their own bucket’s objects user.
kubectl -n aludel-cloudscale-system create secret generic aludel-cloudscale-credentials \
--from-literal=token="$CLOUDSCALE_API_TOKEN"
Deploying into a different namespace means overriding it in both places:
namespace: in config/manager/kustomization.yaml and NAMESPACE in
Justfile.vars.just.
BucketClass parameters
| Parameter | Required | Default | Meaning |
|---|---|---|---|
|
yes |
— |
cloudscale.ch region slug, e.g. |
|
no |
S3 endpoint override |
|
|
no |
|
|
|
no |
|
Use path-style addressing instead of virtual-hosted |
BucketAccessClass needs nothing beyond authenticationType: Key and
multiBucketAccess: SingleBucket (the default). Its parameters, if any, are
parsed the same way, so endpointURL and s3PathStyle have to be repeated
there if the BucketClass overrides them: they are what ends up in the
credentials secret.
What a BucketAccess can ask for
cloudscale.ch has no IAM and no bucket policies, so the only credential that can reach a bucket is the key pair of the objects user that created it. That shapes what aludel-cloudscale accepts:
| BucketAccess / class field | Accepted | Otherwise |
|---|---|---|
|
|
|
|
|
|
|
exactly one |
more than one → |
|
|
|
Every BucketAccess on the same bucket gets the same key pair, and revoking
access is a no-op: rotating the owner’s key would cut off every other
BucketAccess too. Access ends when the bucket is deleted.
The sidecar writes the credentials into the accessSecretName Secret in the
workload’s namespace, one key per value:
| Key | Value |
|---|---|
|
bucket name, |
|
|
|
the region slug |
|
|
|
the owning objects user’s access key |
|
its secret key |
Deleting buckets
With deletionPolicy: Delete on the BucketClass, deleting a BucketClaim
deletes its Bucket, and the driver then deletes the S3 bucket followed by
its objects user. bucketDeletionPolicy decides what happens to a bucket that
still holds objects:
-
DeleteAllempties it (every object and version) and deletes it. -
DeleteIfEmptyrefuses withFailedPrecondition. The sidecar treats that as retryable, so theBucketClaimstays in deletion, with the reason in theBucket’s `status.error, until somebody empties the bucket. The next retry then deletes the bucket and the objects user, and the claim goes away. A Bucket’s parameters are immutable, so emptying it is the only way forward.
deletionPolicy: Retain leaves both the bucket and the objects user alone.
See config/samples/bucketclass.yaml for a full worked example.