Creating ResourceQuotas to limit resource usages of modules

ResourceQuotas are Kubernetes resources that can be used to limit the number of infrastructure resources (such as CPU cores or memory) or Kubernetes resources (such as pods or deployments) that are available on a namespace basis.

From IBM Cloud Pak® for Multicloud Management Fix Pack 5, a set of ResourceQuotas can be used in IBM Cloud Pak® for Multicloud Management to limit the resource usages of IBM Cloud Pak® for Multicloud Management modules. The ResourceQuotas settings are optional, which means that it depends on you whether to use them or not.

As other namespace-scoped Kubernetes resources, ResourceQuotas can be created only in namespaces that already exist. The ibm-management-orchestrator pod in the openshift-operators namespace can create the namespaces that are required for IBM Cloud Pak® for Multicloud Management modules that are enabled in the installation CR. However, you can create the relevant namespaces for IBM Cloud Pak® for Multicloud Management modules beforehand so that the ResourceQuota can be created before resources are provisioned in the related namespaces.

To limit the resource usages of IBM Cloud Pak® for Multicloud Management modules, follow either of the steps:

Creating a ResourceQuota

To create a ResourceQuota, follow the steps:

  1. Copy and paste the following code blocks into a file, and save it.

    • management-operations

      apiVersion: v1
      kind: ResourceQuota
      metadata:
      name: compute-resources
      namespace: management-operations
      spec:
      hard:
          limits.cpu: "50"
          limits.memory: 128Gi
          requests.cpu: "50"
          requests.memory: 128Gi
      
    • management-monitoring

      apiVersion: v1
      kind: ResourceQuota
      metadata:
      name: compute-resources
      namespace: management-monitoring
      spec:
      hard:
          limits.cpu: "50"
          limits.memory: 128Gi
          requests.cpu: "50"
          requests.memory: 128Gi
      
    • management-infrastructure-management

      apiVersion: v1
      kind: ResourceQuota
      metadata:
      name: compute-resources
      namespace: management-infrastructure-management
      spec:
      hard:
          limits.cpu: "50"
          limits.memory: 128Gi
          requests.cpu: "50"
          requests.memory: 128Gi
      
    • management-security-services

      apiVersion: v1
      kind: ResourceQuota
      metadata:
      name: compute-resources
      namespace: management-security-services
      spec:
      hard:
          limits.cpu: "50"
          limits.memory: 128Gi
          requests.cpu: "50"
          requests.memory: 128Gi
      
    • kube-system

      apiVersion: v1
      kind: ResourceQuota
      metadata:
      name: compute-resources
      namespace: kube-system
      spec:
      hard:
          limits.cpu: "50"
          limits.memory: 128Gi
          requests.cpu: "50"
          requests.memory: 128Gi
      
  2. Complete the creation of the ResourceQuota by running the following command:

    oc apply -f file-name-resourcequota-here.yaml