Setting Up init Container for Resources

If an init container is used to pass all application resources, there are two ways to accomplish this:
  1. The IBM Control Center Image can be employed as an Init Container image, and the /app/ccEntrypoint.sh waitForDbDriverToBeCopied function will be invoked as the command. If the user_input Persistent Volume is enabled, this function will then wait for the database JAR files to be copied inside the shared user input volume directory. This approach facilitates the copying of all other resources also, including DB drivers.
    Here is a sample configuration::
    # Customer can use extra init containers to make
    # certain resources available for main container
    # userInput's enabled should be true if user_input directory
    # will be shared for resources like DB Drivers and certificates in waiting state
    extraInitContainers:
      - name: "copy-resources"
        repository: "cp.icr.io/cp/ibm-scc/ibmscc"
        tag: "6.3.1.0_20231222"
        imageSecrets: "sccm-image-secret"
        pullPolicy: Always
        command: "/app/ccEntrypoint.sh waitForDbDriverToBeCopied"
        digest:
          enabled: false
          value: sha256:5d3f79d2d4b42dadb3946996cdecc45e6672aa6d77af9d1700818eb2ee8289d0
        userInput:
          enabled: true
    
    Tip: Set persistentVolumeUserInputs.enabled to true.
    Note: This function will wait for the database JAR file. Once the drivers are copied, the wait will be over, and the next process will continue.
  2. The second method involves creating an Init Container and an image pull secret for pulling the Init Container image, as detailed in the Setting up init container for resources section.
    The following configurations should be included in the values.yaml file:
    # Customer can use extra init containers to make
    # certain resources available for main container
    # userInput's enabled should be true if user_input directory
    # will be shared for resources like DB Drivers and certificates in waiting state
    extraInitContainers:
      - name: "copy-resources"
        repository: "cp.icr.io/cp/ibm-scc/ibmscc"
        tag: "6.3.1.0_20231222"
        imageSecrets: "sccm-image-secret"
        pullPolicy: Always
        command: "cp -r /jdbc_drivers/ /app/conf"
        digest:
          enabled: false
          value: sha256:5d3f79d2d4b42dadb3946996cdecc45e6672aa6d77af9d1700818eb2ee8289d0
        userInput:
          enabled: false
    

    Init Container can copy resources to default /app/CC/conf/ directory.

    Now resources paths will be from /app/CC/conf/ for DB drivers or keystore and truststore is passing through Init container.

    As database driver is inside /app/CC/conf/ then give path as

    ccArgs.dbDrivers as /app/CC/conf/<driver file name>

    If there are multiple drivers, then give all drivers with full path and comma separated.

    If keysore and truststore certificates are passed through wrapper image then give path as:

    ccArgs.keyStore as /app/CC/conf/<Keystore file name>

    and

    ccArgs.trustStore as /app/CC/conf/<TrustStore file name>

    Set persistentVolumeUserInputs.enabled to false.