Kelvin SmartApps™ Configuration
You can learn more about App Configurations in the Overview ⟶ Concepts page.
Creating App Configurations
The configuration variable names and values are defined in the Kelvin SmartApp™'s app.yaml file as configuration.
Configurations can also be optionally defined in the ui_schemas that provides a link to a JSON file containing all the information about how to display Configurations in the Kelvin UI.
Note
Operations will have the option to change these at runtime from the Kelvin UI.
| app.yaml Example | |
|---|---|
1 2 3 4 5 6 7 8 9 10 | |
For the configurations.json file you can define all the information for the Kelvin UI. This can be the title, type of input required and limitations of the values allowed.
It will look something like this.
| sample ui_schema/configurations.json | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Get Configuration Values
This is how to access the global configuration variables in a Kelvin SmartApp™:
| Get Configuration Values Python Example | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Info
app.app_configuration will only be available after app.connect()
You can also get nested App Configuration values;
| Get Nested Configuration Values Python Example | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Updating Configuration Values
Developers and Administrators can update these values through the Kelvin API without needing to re-upload the complete Kelvin SmartApp™ or Kelvin UI.
To update the configuration values dynamically, you use the Kelvin API endpoint /workloads/{workload_name}/configurations/update.
Note
The configurations values are applied directly to a workload. This will not affect the values in the App Registry.
If you have a Kelvin SmartApp™ deployed as many workloads, the updates will only affect the workload you target.
| API cURL Example | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
Upgrading Kelvin SmartApps™
When a Kelvin SmartApp™ is upgraded, Kelvin automatically propagates all matching App Configuration values from the previous version to the new version.
For any new App Configurations introduced in the upgraded Kelvin SmartApp™ version, the default values will initially applied to the Workload.
