Add a template expander abstraction
This commit will introduce the `template.Expander` abstraction, which is meant to abstract over an invocation of the Jsonnet VM. Specifically, it provides facilities for users to provide (e.g.) Jpaths, ext vars, and so on. The main justification for this change is: * We need a common way for the `pkg` and `cmd` packages to interact with the Jsonnet VM. * The `utils` package is already too much of a catch-all. * It's easier to think about an invocation of the Jsonnet VM when we additionally encapsulate the parameters we pass to it on every invocation in kubecfg.
Showing
- cmd/delete.go 6 additions, 1 deletioncmd/delete.go
- cmd/diff.go 6 additions, 1 deletioncmd/diff.go
- cmd/root.go 13 additions, 143 deletionscmd/root.go
- cmd/show.go 6 additions, 1 deletioncmd/show.go
- cmd/update.go 6 additions, 1 deletioncmd/update.go
- cmd/validate.go 7 additions, 1 deletioncmd/validate.go
- template/expander.go 122 additions, 0 deletionstemplate/expander.go
- template/resolver.go 53 additions, 0 deletionstemplate/resolver.go
template/expander.go
0 → 100644
template/resolver.go
0 → 100644
Please register or sign in to comment