Commit Graph

10 Commits

Author SHA1 Message Date
zhouya0 9c14935e27 Add kubectl diff exit code doc
Kubernetes-commit: 527e66fc2829917444d874771142fdd834feb8d6
2020-02-04 17:22:23 +08:00
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
Julian V. Modesto a3f7877cd1 Support DryRun in cli-runtime REST Helper.
- Move TestSupportsDryRun to cli-runtime
- Move TestDryRunVerifier to cli-runtime
- Add OpenAPI schema for testdata to cli-runtime
- Use Helper.DryRun and DryRunVerifier for Apply
- Add WithOptions methods to Helper

Kubernetes-commit: 6bea0e469bcfe4967cbf2656a998d60e0b684747
2019-12-18 22:00:34 -05:00
Antoine Pelisse 104e4d1e7a Improve error message when diff binary is not in PATH
Kubernetes-commit: c1a4cd9c75b4ed476ec3ed1b27a785dd1685a6e3
2020-01-17 16:17:41 -08:00
louisgong ae926dc56e fix kubectl diff panic
Kubernetes-commit: 4f13f2739a3a33c7ed4b86b98054972c0fde4579
2019-11-09 20:34:51 +08:00
David Symonds deabbd435b Fix description of diff flags.
Running `diff -u` produces a unified diff. It isn't related to Unicode.
Also, `diff -N` treats _absent_ files as empty, not new files.

Kubernetes-commit: 0af2dedd96e973f4ed59af0cc325a70ca0b9100a
2019-05-22 13:34:30 +10:00
Antoine Pelisse 4574b365f9 Rename --experimental-* flags to --* for server-side apply
Kubernetes-commit: a3f4e6e933d3292b3921cdc7b60d7ae019ca1580
2019-08-26 09:09:40 -07:00
Sean Sullivan 1483769081 Update gofmt
Kubernetes-commit: e2cae2344486af198f8ab38e4dd97d4f24dfd190
2019-08-01 13:14:06 -07:00
Sean Sullivan 5b48717f2d Update import statements to reflect code move
Kubernetes-commit: acece3c2964115a4f29a43e368ad5de59dbbc258
2019-08-01 11:10:05 -07:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00