Configuring the Cloud Pak foundational services

Update hardware sizing requirements, storage, and more for your installation by updating the CommonService custom resource (which is created when you deploy the Cloud Pak foundational services operator). You can configure it before or after you install IBM Cloud Pak® for Integration.

Deployment size

Configure the size of your installation by updating the default IBM Cloud Pak foundational services size profile in the CommonService custom resource. This CR is located in the namespace where you installed the operators. You can use the OpenShift web console or the command-line interface (CLI).

  • To edit by using the OpenShift web console, complete these steps:

    1. In the navigation pane, click Operators > Installed Operators.

    2. From the Project drop-down list, select the namespace where you installed your operators.

    3. Click IBM Cloud Pak foundational services.

    4. Click the CommonService tab.

    5. Click the common-service resource.

    6. Click the YAML tab. You can now update the value for spec.size. Acceptable profiles are small, medium, or large (for more information, see the table at the end of this section). For example:

      ```yaml
      apiVersion: operator.ibm.com/v3
      kind: CommonService
      metadata:
        name: common-service
      spec:
        size: medium
  • To edit by using the CLI, complete these steps:

    1. Run the following command:

      oc edit CommonService common-service -n <your-foundational-services-namespace>
    2. You can now update the value for spec.size. Acceptable profiles are small, medium, or large (for more information, see the table at the end of this section). For example:

      apiVersion: operator.ibm.com/v3
      kind: CommonService
      metadata:
        name: common-service
      spec:
        size: medium

The tables provide the hardware requirements for each size profile. The values for CPU and memory are the same for both requests and limits.

Table 1. Hardware requirements for Keycloak

Profile CPU per replica Memory per replica Replicas
Starterset 1 1 Gi 1
Small 1 1 Gi 2
Medium 1 1 Gi 2
Large 1 1 Gi 3

Table 2. Hardware requirements for Cloud Native PostgreSQL when used with Keycloak

Profile CPU per replica Memory per replica Replicas
Starterset 0.2 512 Mi 2
Small 0.2 768 Mi 2
Medium 0.5 1024 Mi 2
Large 0.75 1500 Mi 3

Configuring the services namespace

Important: Consider the following limitations:
  • This configuration option is only available for installations that use All namespaces on the cluster mode.
  • You must not change this configuration after any instance has been deployed. This must be done after the operator is installed, and before any instance is created.

Before creating any instance, you can optionally configure the namespace where you want the Cloud Pak foundational services workload to be installed. By default, this is the ibm-common-services namespace.

Configure the namespace by updating the servicesNamespace value in the CommonService custom resource. This CR is located in the openshift-operators namespace. You can use the OpenShift web console or the command-line interface (CLI).

  • To edit by using the OpenShift web console, complete these steps:

    1. In the navigation pane, click Operators > Installed Operators.

    2. From the Project drop-down list, select openshift-operators.

    3. Click IBM Cloud Pak foundational services.

    4. Click the CommonService tab.

    5. Click the common-service resource.

    6. Click the YAML tab. You can now update the value for spec.servicesNamespace. For example:

      apiVersion: operator.ibm.com/v3
      kind: CommonService
      metadata:
        name: common-service
        namespace: openshift-operators
      spec:
        servicesNamespace: integration
  • To edit by using the CLI, complete these steps:

    1. Run the following command:

      oc edit CommonService common-service -n openshift-operators
    2. You can now update the value for spec.servicesNamespace. For example:

      apiVersion: operator.ibm.com/v3
      kind: CommonService
      metadata:
        name: common-service
        namespace: openshift-operators
      spec:
        servicesNamespace: integration

Advanced configuration of deployment size

For more fine-grained resource specification in the CommonService CR, do the following:

  1. Under spec.services, locate a particular name section (for example, name: keycloak-operator).

  2. Update the resources values as applicable for your installation. You can specify a storage class name in data.spec.storage.storageClass. Keycloak uses the storage class that is specified in that field.

The following configuration example includes resources values for Keycloak and EDB:

apiVersion: operator.ibm.com/v3
kind: CommonService
metadata:
  name: common-service
spec:
  ...
  services:
  - name: keycloak-operator
    spec: {}
    resources:
      - apiVersion: k8s.keycloak.org/v2alpha1
        kind: Keycloak
        name: cs-keycloak
        data:
          spec:
            instances: 1
            unsupported:
              podTemplate:
                spec:
                  containers:
                    - resources:
                        limits:
                          cpu: 1000m
                          memory: 1Gi
                        requests:
                          cpu: 1000m
                          memory: 1Gi
  - name: edb-keycloak
    spec: {}
    resources:
      - apiVersion: postgresql.k8s.enterprisedb.io/v1
        kind: Cluster
        name: keycloak-edb-cluster
        data:
          spec:
            storage:
              storageClass: <your-storage-class>
            instances: 3 
            resources:
              limits: 
                cpu: 3000m
                memory: 3Gi
              requests: 
                cpu: 1000m
                memory: 1Gi