An open API service indexing awesome lists of open source software.

https://github.com/orange-cloudfoundry/config-patcher

small utility to patch config file in different format by using yaml patch expression
https://github.com/orange-cloudfoundry/config-patcher

Last synced: 6 months ago
JSON representation

small utility to patch config file in different format by using yaml patch expression

Awesome Lists containing this project

README

          

# config-patcher

small utility to patch config file in different format by using yaml patch expression which can be found on this link: https://github.com/krishicks/yaml-patch .

Config-patcher support these formats as config input:
- json
- yaml
- toml

## Installation

**Config-patcher has been made to work during a bosh lifecycle and should be used through its boshrelease: https://github.com/orange-cloudfoundry/config-patcher-boshrelease**

You can use by cli, by using `go get https://github.com/orange-cloudfoundry/config-patcher`

```
Usage of ./config-patcher:
-patch string
Set in glob format where to find rules for patching config files (default "/var/vcap/jobs/*/config-patcher/*.yml")
```

## Patch format

Create a yaml file in this format (which is accessible which -patch flag):

```yaml
- config_file: # config file in input which will be patched
config_type: # this is actually not mandatory, but you could need to set explicitly type of your config file
patches:
- op:
from: # only valid for the 'move' and 'copy' operations
path: # always mandatory
value: # only valid for 'add', 'replace' and 'test' operations
```