Overprovision level policy control [Technology Preview]

Overprovision control is a mechanism that enables you to define a quota on the amount of Persistent Volume Claims (PVCs) consumed from a storage cluster, based on the specific application namespace.

About this task

Important: Technology Preview features are not supported with IBM production service level agreements (SLAs), might not be functionally complete, and IBM does not recommend using them for production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

When you enable the overprovision control mechanism, it prevents you from overprovisioning the PVCs consumed from the storage cluster. OpenShift provides flexibility for defining constraints that limit the aggregated resource consumption at cluster scope with the help of ClusterResourceQuota. For more information see, OpenShift ClusterResourceQuota.

With overprovision control, a ClusteResourceQuota is initiated, and you can set the storage capacity limit for each storage class. The alarm triggers when 80% of the capacity limit is consumed.

Before you begin

Ensure that the Fusion Data Foundation cluster is created.

Procedure

  1. Deploy storagecluster either from the command line interface or the user interface.
  2. Label the application namespace.
    apiVersion: v1
    kind: Namespace
    metadata:
         name: <desired_name>
         labels:
              storagequota: <desired_label>
    <desired_name>
    Specify a name for the application namespace, for example, quota-rbd.
    <desired_label>
    Specify a label for the storage quota, for example, storagequota1.
  3. Edit the storagecluster to set the quota limit on the storage class, where <ocs_storagecluster_name> specifies the name of the storage cluster.
    oc edit storagecluster -n openshift-storage <ocs_storagecluster_name>
  4. Add an entry for Overprovision Control with the desired hard limit into the StorageCluster.Spec.
    apiVersion: ocs.openshift.io/v1
    kind: StorageCluster
    spec:
     [...]
         overprovisionControl:
         - capacity: <desired_quota_limit>
              storageClassName: <storage_class_name>
              quotaName: <desired_quota_name>
              selector:
                labels:
                       matchLabels:
                        storagequota: <desired_label>
    [...]
    <desired_quota_limit>
    Specify a desired quota limit for the storage class, for example, 27Ti.
    <storage_class_name>
    Specify the name of the storage class for which you want to set the quota limit, for example, ocs-storagecluster-ceph-rbd.
    <desired_quota_name>
    Specify a name for the storage quota, for example, quota1.
    <desired_label>
    Specify a label for the storage quota, for example, storagequota1.
  5. Save the modified storagecluster.
  6. Verify that the clusterresourcequota is defined.
    Note: clusterresourcequota should reflect the quotaName that you defined in the previous step, for example, quota1.
    oc get clusterresourcequota -A
    
    oc describe clusterresourcequota -A