- there are no high level differences
- we got rid of cli flags for extensions
- admins can still configure an instance using a single ocis.yaml
- or overwrite global values present in ocis.yaml with extension.yaml (i.e: proxy.yaml)
- formats supported are
- json
- yaml
- but decoders are easy to extend
- new dependency on https://nicedoc.io/gookit/config
- fun note: we're already upstream contributors to their docs
- we could remove a big dependency: Viper
- viper's main issue: not thread safe, and we load config asynchronously.
- shift in paradigm: each extension is responsible for its own config parsing beyond from the first ocis.yaml parsing. There is an inheritance aspect, that we won't dig into.
- env variables work as usual, functionality was unchanged
- in general all changes were made backwards compatible! following the spirit of the Go backwards compatibility promise, which is something that we want to stick to. Avoid changing behavior.
- demo:
- prepare an ocis.yaml:
- run ocis with it and see changes on logs (faster to see)
ocis.yaml contents:
log:
pretty: true
color: true
proxy:
http:
addr: localhost:7777
debug:
addr: localhost:7776
expectations: all services run and proxy runs on localhost:7777 & localhost:7776
verify with: lsof -iTCP -n -P | grep 7777
- add a proxy.yaml with contents:
http:
addr: localhost:6666
debug:
addr: localhost:5555
- kill already running proxy:
bin/ocis kill proxy
- run again the proxy:
bin/ocis run proxy
it should now run in localhost:6666 and localhost:5555
verify with: lsof -iTCP -n -P | grep 6666