Skip to main content

Remove HOCON

Transforms the user’s configuration file (values.yaml) turning HOCON blocks into YAML blocks. This command is intended to be run in a "one-off" fashion.

note

init command is a pre-requisite and should be run before attempting to use convert-hocon command.

Usage

Usage: witboost-infra convert-hocon [options]

Converts HOCON blocks in the values.yaml into pure YAML format, making them compatible with newer Witboost versions that do not support HOCON parsing

Options:
--user-values <string> values.yaml file which contains HOCON blocks to transform
--output <string> Path for the output file. If not specified, <input-file>-full.yaml will be used
-h, --help display help for command

Example

./witboost-infra convert-hocon --user-values values.yaml

Input (example)

provisioning-coordinator:
a_key: a_value
configOverride: |-
akka {
http.parsing.max-header-value-length = 256k
http.server.request-timeout = 120 seconds
http.server.idle-timeout = 120 seconds
}

Output (example)

provisioning-coordinator:
a_key: 'a_value'
configOverride:
akka:
http:
parsing:
max-header-value-length: 256k
server:
request-timeout: 120 seconds
idle-timeout: 120 seconds

Expected input format

The behavior of the command looks for three specific configuration blocks to transform:

  • provisioning-coordinator.configOverride
  • mock-specific-provisioner.configOverride
  • governance-platform.configOverride

If, for some reasons, you have HOCON blocks in other blocks of your values.yaml, those won't be transformed into YAML. They will be left as they are. This is because the command transforms pieces of configurations that Witboost knows how to handle.