monitoring-mixins / mixtool

mixtool is a helper for easily working with jsonnet mixins.
Apache License 2.0
139 stars 15 forks source link

Use Tanka's native functions - mainly so mixins can use parseYaml #13

Closed tomwilkie closed 4 years ago

tomwilkie commented 4 years ago

(Builds on https://github.com/monitoring-mixins/mixtool/pull/12)

tomwilkie commented 4 years ago

(cc @sdboyer and @sh0rez)

metalmatze commented 4 years ago

There are some conflicts here :)

I'm wondering, should we do this with native functions? This tool being written in Go, we could parse the YAML in Go and then output the data as JSON to forward this to jsonnet, keeping jsonnet pretty much as is.

sh0rez commented 4 years ago

@metalmatze this PR pretty much does that. It's hard to see as nothing is rebased yet, but it pulls in the native functions Tanka has: https://tanka.dev/jsonnet/native

parseYaml is defined here: https://github.com/grafana/tanka/blob/master/pkg/jsonnet/native/funcs.go#L52