Restricting the list of storage classes that are available to an instance of IBM Software Hub

After you install IBM® Software Hub, you can optionally restrict the list of storage classes that end users can see and select in the web client. By default, users can see all of the storage classes that are defined on the cluster. However, you might want to prevent users from selecting certain storage classes when creating new storage volumes or deploying service instances.

Who needs to complete this task?
To complete this task, you must have one of the following roles:
  • Cluster administrator
  • Instance administrator
When do you need to complete this task?
Complete this task if you want to prevent users from selecting certain storage classes when they:
  • Create new storage volumes
  • Deploy service instances

Before you begin

Best practice: You can run many of the commands in this task exactly as written if you set up environment variables for your installation. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

Work with your cluster administrator to determine which storage classes to display in the web client. As part of this discussion, you might need to consider which services you plan to deploy on this instance of IBM Software Hub.

About this task

You can restrict the list of storage classes by creating a list of allowed storage classes in the IBM Software Hub product-configmap file.

Procedure

  1. Log in to Red Hat® OpenShift® Container Platform as a user with sufficient permissions to complete the task.
    oc login ${OCP_URL}
  2. Change to the project where IBM Software Hub is installed:
    oc project ${PROJECT_CPD_INST_OPERANDS}
  3. Run the following command to edit the IBM Software Hub product-configmap:
    oc edit configmap product-configmap
  4. Add an entry for the ALLOWED_STORAGE_CLASSES parameter to the data section of the product-configmap file. For example:
    data:
      ...
      ALLOWED_STORAGE_CLASSES: "storage-class-1, storage-class-2, storage-class-3"
      ...

    Specify multiple storage classes as a comma separated list.

  5. Save your changes to the product-configmap file.

    For example, if you are using vi, hit esc and enter:

    :wq