- https://github.com/google/jsonnet or https://github.com/google/go-jsonnet
- https://github.com/jsonnet-bundler/jsonnet-bundler
-
jb init
to create an empty jsonnetfile.json -
jb install github.com/prometheus-operator/[email protected]
-
Create
main.jsonnet
with following content just to evaulate the jsonnet mixin from prometheus-operator(import 'github.com/prometheus-operator/prometheus-operator/jsonnet/mixin/alerts.jsonnet')
-
Run
jsonnet -J vendor main.jsonnet
to generate json file-J vendor
is specified for jsonnet to search library in this location since we had pulled library usingjb
-
To generate yaml from this json use
gojsontoyaml
utilityjsonnet -J vendor main.jsonnet|gojsontoyaml`