docker-archive / deploykit

A toolkit for creating and managing declarative, self-healing infrastructure.
Apache License 2.0
2.25k stars 264 forks source link

Refactor common template view code; add CLI option to render view #881

Closed chungers closed 6 years ago

chungers commented 6 years ago

There is a common pattern of using a template expression to compute a view on an instance.Description. This shows up in

So it makes sense to move this common template rendering code to the instance.Description. Also, the CLI has been updated so that a describe on an instance plugin can now accept a view template -z {{ index .Tags "infrakit-link" }} and will render just two columns per row / instance: the id and the resulting view.

Signed-off-by: David Chung david.chung@docker.com

codecov[bot] commented 6 years ago

Codecov Report

Merging #881 into master will decrease coverage by 0.11%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #881      +/-   ##
==========================================
- Coverage   48.59%   48.48%   -0.12%     
==========================================
  Files          94       84      -10     
  Lines        8448     7698     -750     
==========================================
- Hits         4105     3732     -373     
+ Misses       3978     3667     -311     
+ Partials      365      299      -66
Impacted Files Coverage Δ
pkg/template/funcs.go 63.46% <ø> (+0.72%) :arrow_up:
pkg/spi/loadbalancer/protocol.go
pkg/provider/maas/plugin/instance/instance.go
pkg/spi/loadbalancer/spi.go
pkg/plugin/instance/lazy.go
pkg/spi/group/lazy.go
pkg/provider/libvirt/plugin/instance/instance.go
pkg/spi/instance/types.go
pkg/plugin/instance/file/plugin.go
...ovider/digitalocean/plugin/instance/types/types.go

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 69c8760...8301853. Read the comment docs.