kubectl/pkg/cmd
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
..
annotate Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
apiresources Removes duplicate TabWriter. Several updates to reference the one remaining TabWriter in cli-runtime. 2019-10-17 13:32:40 -07:00
apply Support DryRun in cli-runtime REST Helper. 2019-12-18 22:00:34 -05:00
attach test: kubectl unit tests should be using codecs without conversion 2019-11-03 15:20:10 -05:00
autoscale Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
certificates Kubectl certificate signing: fix certificate deny message (#84400) 2019-10-27 03:24:33 +00:00
clusterinfo cleanup req.Context() and ResponseWrapper 2020-01-27 18:52:27 -08:00
completion Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00
config Removes duplicate TabWriter. Several updates to reference the one remaining TabWriter in cli-runtime. 2019-10-17 13:32:40 -07:00
create Support DryRun in cli-runtime REST Helper. 2019-12-18 22:00:34 -05:00
delete Modify the status code number to HTTP status semantics 2019-11-06 00:45:35 +08:00
describe Modify the status code number to HTTP status semantics 2019-11-06 00:45:35 +08:00
diff kubectl-diff: Return non-1 errors on kubectl failures 2020-01-21 13:52:41 -08:00
drain Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
edit Modify the status code number to HTTP status semantics 2019-11-06 00:45:35 +08:00
exec test: kubectl unit tests should be using codecs without conversion 2019-11-03 15:20:10 -05:00
explain Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00
expose Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
get fixup kubectl test 2019-11-26 13:13:38 -05:00
help Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00
kustomize Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00
label Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
logs cleanup req.Context() and ResponseWrapper 2020-01-27 18:52:27 -08:00
options Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00
patch Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
plugin Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00
portforward Fix a bug in port-forward: named port not working with service 2019-11-22 02:59:26 +09:00
proxy Refactor `kubectl proxy` command to have similar design pattern as other kubectl commands. 2019-09-21 10:52:42 -07:00
replace Support DryRun in cli-runtime REST Helper. 2019-12-18 22:00:34 -05:00
rollingupdate Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
rollout Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
run Remove kubectl run generators 2020-01-09 17:09:51 +01:00
scale Drop job from scale description 2019-10-23 12:25:42 +02:00
set Extend --dry-run to support string values. 2019-12-15 18:29:27 -05:00
taint Fix kubectl taint's Complete parsing 2020-01-21 14:36:16 +01:00
testing Modify the status code number to HTTP status semantics 2019-11-06 00:45:35 +08:00
top test: kubectl unit tests should be using codecs without conversion 2019-11-03 15:20:10 -05:00
util kubectl-diff: Return non-1 errors on kubectl failures 2020-01-21 13:52:41 -08:00
version remove pkg/version and some of redundant copies of it 2019-09-10 14:42:55 -07:00
wait Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00
alpha.go Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00