kubectl/pkg
Antoine Pelisse 4c36396b35 kubectl-diff: Return non-1 errors on kubectl failures
Currently, diff AND kubectl can return 1 errors either when diff finds
differences, or when kubectl fails something. It also prints an ugly
error when diff finds a differences, since 1 is treated as an error.

Two things this PR does:

1. If diff returns 1, then do not treat it as an error, and exit with
exit code 1. It no longer prints the ugly error.

2. Kubectl errors are +1'd so that they never return 1 which shouldn't
be considered an error.

We need to update the documentation accordingly, to mention that
`KUBECTL_EXTERNAL_DIFF` programs must also follow the convention of
using one as their exit code for changes detected.

Kubernetes-commit: f2b21f08d95291212ba8987aa9d446c02a96089a
2020-01-21 13:52:41 -08:00
..
apply Rename test/data directory to testdata 2019-10-31 13:40:02 -07:00
apps Move pkg/kubectl/apps to staging 2019-07-24 20:02:05 -07:00
cmd kubectl-diff: Return non-1 errors on kubectl failures 2020-01-21 13:52:41 -08:00
describe Fix describe of statefulset prints pointer not value 2019-12-03 14:33:31 +01:00
drain kubectl/drain: add option skip-wait-for-delete-timeout 2019-11-23 20:00:06 -05:00
explain Move pkg/kubect/explain to staging 2019-07-29 14:57:41 -07:00
generate Remove kubectl run generators 2020-01-09 17:09:51 +01:00
generated Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-28 21:29:36 -07:00
metricsutil cleanup req.Context() and ResponseWrapper 2020-01-27 18:52:27 -08:00
polymorphichelpers Fix(kubectl): the field of history controllerrevision will be covered by daemonset 2019-12-12 23:14:47 +08:00
proxy Move pkg/kubectl/proxy to staging 2019-07-25 12:01:00 -07:00
rawhttp refactor 2020-01-27 18:19:44 -08:00
scale unify alias of api errors under pkg and staging 2019-11-12 16:26:59 +08:00
scheme Minor cleanup of jsonFallbackEncoder 2019-09-22 13:50:05 +02:00
util Support DryRun in cli-runtime REST Helper. 2019-12-18 22:00:34 -05:00
validation Move pkg/kubectl/validation to staging 2019-06-26 12:56:28 -07:00