Skip to content
Object Storage Manager

Object Storage Manager

The Object Storage Manager creates Thalassa Cloud object storage buckets from Kubernetes. It can also create a service account, an object storage credential, and a Kubernetes Secret so a workload can use the bucket.

Warning

This controller is a preview. The API may change.

The controller runs in the cluster. It calls the Thalassa Object Storage and IAM APIs with workload identity federation. It does not store a long-lived Thalassa credential in the controller configuration.

Custom resources

The API group is objectstorage.controllers.thalassa.cloud/v1.

KindPurpose
BucketCreates, updates, and deletes a Thalassa object storage bucket.
BucketAccessGrants access to one or more buckets.

BucketAccess has two modes. Set exactly one of writeSecretToRef or principalRef.

ModeFieldResult
ManagedwriteSecretToRefThe controller creates a service account and a credential, grants a bucket policy, and writes a Secret.
ExternalprincipalRefThe controller grants a bucket policy to an existing Thalassa user or service account. It does not write a Secret.

A managed Secret contains the keys accessKey, secretKey, endpoint, bucket, and buckets. Treat that Secret as a credential. Limit which namespaces the controller may write Secrets into.

permissionPreset defaults to ReadWrite. Set ReadOnly when the workload only reads objects. The controller rejects admin actions such as s3:*, PutBucketPolicy, and DeleteBucket.

spec.generateNameSuffix defaults to true. The Thalassa bucket name is then <base>-<random>. The final name is status.bucketName. Set generateNameSuffix: false when the bucket name must stay fixed.

Before you install

  • A Thalassa Cloud Kubernetes cluster with an identity provider.
  • Helm 3 and permission to pull charts from oci://ghcr.io/thalassa-cloud/charts/.
  • The tcloud CLI, with permission to bootstrap workload identity.

The controller service account needs permission to manage buckets, service accounts, and service account access credentials. It also needs read access to organisation memberships when principalRef.kind is User.

The bootstrap example uses the role thalassa:kubernetes:ObjectStorageManager. That role may not exist in your organisation yet. When it is missing, bind policies that cover the same actions. objectstorage:FullAccess covers buckets. The controller also creates service accounts and credentials, so bucket access alone is not enough.

Install

Bootstrap the controller service account once. Replace the organisation, cluster, and role when your organisation uses a different binding.

export ORGANISATION="<organisation-slug-or-id>"
export CLUSTER_ID="<cluster-id>"

tcloud iam workload-identity-federation bootstrap kubernetes \
  --cluster "$CLUSTER_ID" \
  --namespace thalassa-objectstorage-manager \
  --service-account thalassa-objectstorage-manager \
  --role thalassa:kubernetes:ObjectStorageManager

Copy the Thalassa service account ID from the command output.

Install the CRDs, then the controller. Replace <version> with the chart release you want to run. Set defaultRegion to the region of the buckets. List every namespace where BucketAccess writes Secrets in rbac.secretNamespaces. The release namespace is always included.

export THALASSA_SERVICE_ACCOUNT_ID="<thalassa-service-account-id>"

helm upgrade --install thalassa-objectstorage-manager-crds \
  oci://ghcr.io/thalassa-cloud/charts/thalassa-objectstorage-manager-crds:<version> \
  --namespace thalassa-objectstorage-manager \
  --create-namespace

helm upgrade --install thalassa-objectstorage-manager \
  oci://ghcr.io/thalassa-cloud/charts/thalassa-objectstorage-manager:<version> \
  --namespace thalassa-objectstorage-manager \
  --create-namespace \
  --set thalassa.organisation="$ORGANISATION" \
  --set thalassa.tokenExchange.serviceAccountId="$THALASSA_SERVICE_ACCOUNT_ID" \
  --set defaultRegion=nl-01 \
  --set rbac.secretNamespaces[0]=default

rbac.clusterScopedSecrets=true lets the controller write Secrets in every namespace. Leave that value false unless the cluster must allow it.

The chart enables a validating webhook and expects cert-manager for the webhook TLS certificate. Other authentication methods are described in the chart README in the source repository.

Example

apiVersion: objectstorage.controllers.thalassa.cloud/v1
kind: Bucket
metadata:
  name: app-data
  namespace: default
spec:
  name: app-data
  generateNameSuffix: false
  region: nl-01
  deleteProtection: true
---
apiVersion: objectstorage.controllers.thalassa.cloud/v1
kind: BucketAccess
metadata:
  name: app-data-access
  namespace: default
spec:
  bucketRefs:
    - name: app-data
  writeSecretToRef:
    name: app-data-credentials
  permissionPreset: ReadOnly

spec.deletionPolicy defaults to Delete. The controller deletes the Thalassa bucket when you delete the Bucket object. Set Orphan to keep the bucket.

With deleteProtection: true, the webhook rejects deletion until you set spec.deleteProtection to false.

Related documentation