Add new `resolveImage` native function
Add a new native function that resolves docker image names into more specific forms. In particular, it can look up a docker registry and convert image:tag to image@digest at jsonnet-eval time. Limitations: Does not currently support private docker registries (that require authentication). Controlled via two new command line flags: - `--resolve-images` Change implementation of resolveImage native function. One of: noop, registry (default "noop") - `--resolve-images-error` Action when resolveImage fails. One of ignore,warn,error (default "warn") Note in particular that the defaults will *not* do remote registry lookups, and will only add an explicit ":latest" tag where no tag was given. Fixes #13
Showing
- cmd/root.go 66 additions, 3 deletionscmd/root.go
- lib/kubecfg.libsonnet 5 additions, 0 deletionslib/kubecfg.libsonnet
- lib/kubecfg_test.jsonnet 3 additions, 0 deletionslib/kubecfg_test.jsonnet
- utils/nativefuncs.go 19 additions, 1 deletionutils/nativefuncs.go
- utils/nativefuncs_test.go 2 additions, 2 deletionsutils/nativefuncs_test.go
- utils/registry.go 211 additions, 0 deletionsutils/registry.go
- utils/registry_test.go 90 additions, 0 deletionsutils/registry_test.go
- utils/resolver.go 146 additions, 0 deletionsutils/resolver.go
- utils/resolver_test.go 149 additions, 0 deletionsutils/resolver_test.go
Please register or sign in to comment