Setting up dynamic provisioning for Flink

Dynamic provisioning is enabled by default. This storage mode automatically creates the necessary persistent volumes (PV).

About this task

When you deploy Business Automation Insights, by default the persistence.use_dynamic_provisioning parameter is set to true. If you keep this default setting, you need a storage class that by default creates persistent volumes with the Retain reclaim policy. You can use the storage class that is configured as the default storage class of your Kubernetes environment, or a different storage class. Configuration parameters for IBM Cloud Pak® for Business Automation custom resources start with the spec.bai_configuration. prefix.

Procedure

  1. Make sure that you use a storage class that by default creates persistent volumes with the Retain reclaim policy.
    Important: If you do not ensure that the persistent volumes use the Retain reclaim policy, you might lose your data when you upgrade or update your Business Automation Insights deployment because a different persistent volume might be allocated.
    • For more information about policy types, see the Persistent Volumes page of the Kubernetes documentation.
    • To learn how to change the policy type of existing persistent volumes, see the Reclaim Policy page of the Kubernetes documentation.
  2. To configure the default storage class for all the volumes that are provisioned for the ICP4BA cluster, use the shared_configuration.sc_dynamic_storage_classname parameter.
    If you prefer to customize specifically the persistent volume for Business Automation Insights, use the bai_configuration.flink_pv.storage_class_name parameter.

Example

This example shows a storage configuration in the custom resource file when persistence is enabled. This configuration creates the PersistentVolumeClaim resource that is listed with the default configuration. For dynamic provisioning, change all occurrences of the <RWX_STORAGE_CLASS> placeholder to the name of the storage class that is appropriate for your deployment platform.
spec:
  bai_configuration:
    persistence:
      use_dynamic_provisioning: true

    flink_pv:
      storage_class_name: "<RWX_STORAGE_CLASS>"