Configuring Keycloak and IBM PostgreSQL

Update hardware sizing requirements, storage, and more for your installation by updating the ibm-integration-services-config ConfigMap. You can configure it before or after you install IBM Cloud Pak® for Integration.

Deployment size

Configure the resources for your installation by updating the default size profile in the ibm-integration-services-config ConfigMap. This ConfigMap is located in the namespace where you installed the IBM Cloud Pak for Integration operator. You can use the OpenShift web console or the CLI.

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

    1. In the navigation pane, click Workloads > ConfigMaps.

    2. Click to expand the Project menu, and select the namespace where you installed the IBM Cloud Pak for Integration operator.

    3. Click the ibm-integration-services-config ConfigMap.

    4. Click the YAML tab. You can now update the value for data.size. Acceptable profiles are starterset, small, medium, or large. For more information, see the table at the end of this section.

      The following example sets a sizing requirement of starterset:

      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: ibm-integration-services-config
      data:
        size: starterset
  • To edit by using the CLI, complete these steps:

    1. Run the following command:

      oc edit ConfigMap ibm-integration-services-config -n <operator-namespace>
    2. You can now update the value for data.size. Acceptable profiles are starterset, small, medium, or large. For more information, see the table at the end of this section.

      The following example sets a sizing requirement of starterset:

      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: ibm-integration-services-config
      data:
        size: starterset

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 IBM 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 an instance, you can optionally configure the namespace where you want the Keycloak and IBM Postgres workloads to be installed. By default, this is the ibm-common-services namespace.

Configure the namespace by updating the servicesNamespace value in the ibm-integration-services-config ConfigMap. This ConfigMap is located in the namespace where you installed the IBM Cloud Pak for Integration operator. You can use the OpenShift web console or the CLI.

  • To edit by using the OpenShift web console, complete the following steps.

    1. In the navigation pane, click Workloads > ConfigMaps.

    2. Click to open Project and select the namespace where you installed the IBM Cloud Pak for Integration operator.

    3. Click the ibm-integration-services-config ConfigMap.

    4. Click the YAML tab. You can now update the value for data.servicesNamespace. In this example, the value of servicesNamespace is ibm-common-services:

      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: ibm-integration-services-config
      data:
        servicesNamespace: ibm-common-services
  • To edit by using the CLI, complete the following steps.

    1. Run the following command:

      oc edit ConfigMap ibm-integration-services-config -n <operator-namespace>
    2. You can now update the value for data.servicesNamespace. For example:

      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: ibm-integration-services-config
      data:
        servicesNamespace: ibm-common-services

Advanced configuration for deployment size

To set fine-grained resource specification values in the ibm-integration-services-config ConfigMap, follow these steps:

  1. In the data.template section, add a particular resource to the array.

  2. Update the values as applicable for your installation.

The following configuration example sets resource values for Keycloak and IBM PostgreSQL in the resources section:

kind: ConfigMap
apiVersion: v1
metadata:
  name: ibm-integration-services-config
data:
  template: |
    - apiVersion: pg.integration.ibm.com/v1
      kind: Cluster
      name: keycloak-edb-cluster
      spec:
        instances: 3
        resources:
          limits:
            cpu: 3000m
            memory: 3Gi
          requests:
            cpu: 1000m
            memory: 1Gi
        storage:
          storageClass: someStorage
    - apiVersion: k8s.keycloak.org/v2alpha1
      kind: Keycloak
      name: cs-keycloak
      spec:
        instances: 2
        unsupported:
          podTemplate:
            spec:
              containers:
              - resources:
                  limits:
                    cpu: 1000m
                    memory: 1Gi
                  requests:
                    cpu: 1000m
                    memory: 1Gi