mirror of https://github.com/linkerd/linkerd2.git
If an input file is un-injectable, existing inject behavior is to simply output a copy of the input. Introduce a report, printed to stderr, that communicates the end state of the inject command. Currently this includes checking for hostNetwork and unsupported resources. Malformed YAML documents will continue to cause no YAML output, and return error code 1. This change also modifies integration tests to handle stdout and stderr separately. example outputs... some pods injected, none with host networking: ``` hostNetwork: pods do not use host networking...............................[ok] supported: at least one resource injected..................................[ok] Summary: 4 of 8 YAML document(s) injected deploy/emoji deploy/voting deploy/web deploy/vote-bot ``` some pods injected, one host networking: ``` hostNetwork: pods do not use host networking...............................[warn] -- deploy/vote-bot uses "hostNetwork: true" supported: at least one resource injected..................................[ok] Summary: 3 of 8 YAML document(s) injected deploy/emoji deploy/voting deploy/web ``` no pods injected: ``` hostNetwork: pods do not use host networking...............................[warn] -- deploy/emoji, deploy/voting, deploy/web, deploy/vote-bot use "hostNetwork: true" supported: at least one resource injected..................................[warn] -- no supported objects found Summary: 0 of 8 YAML document(s) injected ``` TODO: check for UDP and other init containers Part of #1516 Signed-off-by: Andrew Seigner <siggy@buoyant.io> |
||
---|---|---|
.. | ||
testdata | ||
check.go | ||
check_test.go | ||
completion.go | ||
completion_test.go | ||
dashboard.go | ||
get.go | ||
get_test.go | ||
inject.go | ||
inject_test.go | ||
install.go | ||
install_test.go | ||
root.go | ||
stat.go | ||
stat_test.go | ||
tap.go | ||
tap_test.go | ||
test_helper.go | ||
top.go | ||
version.go | ||
version_test.go |