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
- Host: GitHub
- URL: https://github.com/orange-cloudfoundry/config-patcher
- Owner: orange-cloudfoundry
- License: apache-2.0
- Created: 2019-10-25T14:28:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-29T08:50:30.000Z (almost 2 years ago)
- Last Synced: 2024-08-29T10:11:26.832Z (almost 2 years ago)
- Language: Go
- Size: 4.04 MB
- Stars: 4
- Watchers: 10
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```