Issue tracker and mirror of kubectl code
Go to file
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
.github Adds staging directory for kubectl code 2019-05-29 23:31:23 -07:00
Godeps Merge pull request #87580 from julianvmodesto/kubectl-ss-dry-run-flag 2020-01-31 20:49:27 +00:00
docs Clalify how to contribute to kubectl book 2019-10-05 16:47:05 +09:00
images Adds kubectl logo images 2019-06-21 11:34:42 -07:00
pkg kubectl-diff: Return non-1 errors on kubectl failures 2020-01-21 13:52:41 -08:00
testdata Rename PodDisruptionsAllowed to DisruptionsAllowed in type PodDisruptionBudgetStatus 2019-12-03 11:22:23 -08:00
CONTRIBUTING.md Adds staging directory for kubectl code 2019-05-29 23:31:23 -07:00
LICENSE Adds staging directory for kubectl code 2019-05-29 23:31:23 -07:00
OWNERS Adds staging directory for kubectl code 2019-05-29 23:31:23 -07:00
README.md Adds staging directory for kubectl code 2019-05-29 23:31:23 -07:00
SECURITY_CONTACTS Update security contacts for kubectl 2019-09-03 10:15:43 +02:00
code-of-conduct.md Adds staging directory for kubectl code 2019-05-29 23:31:23 -07:00
go.mod Merge pull request #87580 from julianvmodesto/kubectl-ss-dry-run-flag 2020-01-31 20:49:27 +00:00
go.sum Merge pull request #87580 from julianvmodesto/kubectl-ss-dry-run-flag 2020-01-31 20:49:27 +00:00

README.md

Kubectl

kubectl logo

Build Status GoDoc

The k8s.io/kubectl repo is used to track issues for the kubectl cli distributed with k8s.io/kubernetes. It also contains packages intended for use by client programs. E.g. these packages are vendored into k8s.io/kubernetes for use in the kubectl cli client. That client will eventually move here too.

Contribution Requirements

  • Full unit-test coverage.

  • Go tools compliant (go get, go test, etc.). It needs to be vendorable somewhere else.

  • No dependence on k8s.io/kubernetes. Dependence on other repositories is fine.

  • Code must be usefully commented. Not only for developers on the project, but also for external users of these packages.

  • When reviewing PRs, you are encouraged to use Golang's code review comments page.

  • Packages in this repository should aspire to implement sensible, small interfaces and import a limited set of dependencies.

Dependencies

Dependencies are managed using dep. Please refer to its documentation if needed.

Community, discussion, contribution, and support

See this document for how to reach the maintainers of this project.

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.