Skip to content

slashpai/jsonnet_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonnet_demo

Pre-requistes

Steps followed

  • jb init to create an empty jsonnetfile.json

  • jb install github.com/prometheus-operator/prometheus-operator@v0.52.1

  • 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 using jb
  • To generate yaml from this json use gojsontoyaml utility

    jsonnet -J vendor main.jsonnet|gojsontoyaml`

Releases

No releases published

Packages

No packages published