polly
polly copied to clipboard
Jsonnet -> polly converter
I believe it would help with adoption in new projects if we could somehow import existing jsonnet mixins as a polly pkg.
I hit this issue when rewriting parts of kube-prometheus into cue as all upstream monitoring mixins are written in jsonnet.
Goal is - to increase and simplify adoption, we need something that would convert existing jsonnet mixins into a polly package. For MVP, it's a basic conversion without any parameterization.
So, render jsonnet->JSON and then suck it into a polly package.
Essential pieces for this workflow:
- Don't need to actually invoke jsonnet from the binary, it's enough to accept on stdin
- Only assumption to make is that we get a stream of JSON which will follow the naming conventions established within mixins for where different object types live
- Given these inputs, convert them over and write out a polly package structure
This potentially paves the way for working in polly directly in a mixin-oriented operator.