Skip to content

ASAB Config technology

Descriptors can specify default cluster configurations thanks to ASAB Config technology.

Descriptor section asab-config

This technology reads asab-config section from all descriptors and creates cluster configuration.

E.g. Kafdrop descriptor specifies configuration file Kafdrop.json for configuration type Tools:

define:
  type: rc/descriptor
  name: Kafdrop
  url: https://github.com/obsidiandynamics/kafdrop

descriptor:
  image: obsidiandynamics/kafdrop
  environment:
    SERVER_PORT: 9000  # this is the only working port
    SERVER_SERVLET_CONTEXTPATH: /kafdrop
    KAFKA_BROKERCONNECT: '{{KAFKA_BOOTSTRAP_SERVERS}}'

asab-config:
  Tools:
     Kafdrop: 
        file:
          {
              "Tool": {
                  "image": "media/tools/kafka.svg",
                  "name": "Kafdrop",
                  "url": "/kafdrop"
              },
              "Authorization": {
                  "tenants": "system"
              }
          }
        if_not_exists: true

The instruction in the descriptor is to create configuration Kafdrop of type Tools. Inside the Kafdrop configuration, you can see two sections: file and if_not_exists.

  • file section expects configuration file, a json file directly inserted into the descriptor (as here in the example). The other option is to specify a file from the /Site/Files/<service_id>/ directory of the Library, similarly as in the files section of the descriptor.
  • if_not_exists allows only two options: true or false. Default is false - it means that the configuration is uploaded and updated according to the descriptor everytime the model is being applied. When true, the configuration is created only if it does not yet exist. That means, that such configuration can be changed manually and won't be overwritten by the automatic actions of ASAB Remote Control. On the other hand, such configuration is not updated with new versions of the descriptor.