Object Storage Quotas
So you've got OpenShift Data Foundations installed in your OpenShift cluster and now you've got tenants of your clusters clamouring to consume object storage.
This short write-up will explain how to give each tenant a safe quota of storage they can consume.
Pre-requisites
Before we begin, let's ensure we are logged into our cluster in the terminal and the cluster meets our version requirements.
Verify cluster auth status
oc version && oc whoami
Client Version: 4.19.7 Kustomize Version: v5.5.0 Server Version: 4.19.9 Kubernetes Version: v1.32.7 admin
Verify odf storage installed
oc get crd | grep noobaa
backingstores.noobaa.io 2025-08-20T22:36:51Z bucketclasses.noobaa.io 2025-08-20T22:36:50Z namespacestores.noobaa.io 2025-08-20T22:36:51Z noobaaaccounts.noobaa.io 2025-08-20T22:36:51Z noobaas.noobaa.io 2025-08-20T22:36:51Z
Create a sample tenant
Let's create an example tenant project called storage-tenant that a separate user on our cluster called user1 will own.
cat << EOF | oc apply --user admin --filename -
apiVersion: project.openshift.io/v1
kind: Project
metadata:
  annotations:
    openshift.io/requester: user1
  name: storage-tenant
EOF
project.project.openshift.io/storage-tenant created
Once the project is created we'll run a quick oc adm command to ensure user1 has full privileges within the project.
oc --user admin adm policy add-role-to-user admin user1 --namespace storage-tenant
clusterrole.rbac.authorization.k8s.io/admin added: "user1"
Create a custom bucket class
cat << EOF | oc --user admin apply --filename -
apiVersion: noobaa.io/v1alpha1
kind: BucketClass
metadata:
  finalizers:
  - noobaa.io/finalizer
  labels:
    app: noobaa
  name: custom-tenant-bucket-class
  namespace: openshift-storage
spec:
  placementPolicy:
    tiers:
    - backingStores:
      - noobaa-default-backing-store
  quota:
    maxSize: 1Gi
EOF
bucketclass.noobaa.io/custom-tenant-bucket-class created