/
Work In Progress - Configuration API's

Work In Progress - Configuration API's

Requirements

Day 2 Configurations for applications are applied using K8S kinds (typically CRDs) implemented by application specific operators.  For a given application, type of configuration is similar (but not the values), therefore configuration templates are created by applications.  These templates are for each application and are expected to be created even before Day 2 configuration is applied. Once the templates are created, configuration can be applied by choosing the right template. Day 2 configuration is applied by users as and when new configuration is required. As a user, he/she should select the template and supply values to apply new configuration. 

Configuration Template Management API

CRUD Operations

The following curl commands can be used to upload a Day 2 Configuration template. 

Command to POST (create) Template:

curl -i -d @create_config_template.json -X POST http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config-template/

With the following JSON content (create_config_template.json )

{ "name": "kafka_token" "description": "testing Kafka Day 2 config configuration", }

Command to UPLOAD Template:

curl -i --data-binary @kafka-config.tar.gz -X POST http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config-template/{name}

Command to GET  Templates:

Command to DELETE Templates:

Example 

Example Contents of Tar File 

Configuration Values Management API

In Day2 apply configuration API each instance of configuration is identified by  rb_name, rb_version and profile_name. The body of the API contains set of parameter and value list.

CRUD Operations

Command to POST (create) Configuration Values

With the following JSON content (values.json )

Profile JSON Body


This command returns the following JSON which contains config-version id.

Profile JSON Body

Command to GET Configuration Values

Command to DELETE Configuration Values

Command to PUT (Modify) Configuration Values 

With the following JSON content (values.json )

Profile JSON Body


This command returns the following JSON which contains config-version.

Profile JSON Body

Command to TAG  configuration Values 

This will add the tag name to the current config version

With the following JSON content (values.json )

Profile JSON Body


Command to ROLLBACK   configuration Values 

Rollbacks configuration to a config version or a tag. 

With the following JSON content (values.json )

Profile JSON Body