kubernetes/pkg/printers
Kubernetes Submit Queue f37cffcf4e Merge pull request #43239 from enisoc/kubectl-controller-ref
Automatic merge from submit-queue

kubectl: Use v1.5-compatible ownership logic when listing dependents.

**What this PR does / why we need it**:

This restores compatibility between kubectl 1.6 and clusters running Kubernetes 1.5.x. It introduces transitional ownership logic in which the client considers ControllerRef when it exists, but does not require it to exist.

If we were to ignore ControllerRef altogether (pre-1.6 client behavior), we would introduce a new failure mode in v1.6 because controllers that used to get stuck due to selector overlap will now make progress. For example, that means when reaping ReplicaSets of an overlapping Deployment, we would risk deleting ReplicaSets belonging to a different Deployment that we aren't about to delete.

This transitional logic avoids such surprises in 1.6 clusters, and does no worse than kubectl 1.5 did in 1.5 clusters. To prevent this when kubectl 1.5 is used against 1.6 clusters, we can cherrypick this change.

**Which issue this PR fixes**:

Fixes #43159

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-03-17 14:25:38 -07:00
..
internalversion Merge pull request #43239 from enisoc/kubectl-controller-ref 2017-03-17 14:25:38 -07:00
.import-restrictions Restrict imports for printers 2017-02-23 00:28:31 -05:00
BUILD generated: bazel 2017-02-23 00:28:32 -05:00
common.go Refactor printers to separate typed printers from generic code 2017-02-23 00:28:30 -05:00
customcolumn.go Refactor printers to separate typed printers from generic code 2017-02-23 00:28:30 -05:00
customcolumn_test.go Refactor printers to separate typed printers from generic code 2017-02-23 00:28:30 -05:00
humanreadable.go Fix error printing objects from kubectl get -w 2017-02-28 22:36:26 -05:00
interface.go Refactor printers to separate typed printers from generic code 2017-02-23 00:28:30 -05:00
json.go Move, but do not refactor, printers to their own package 2017-02-23 00:28:30 -05:00
jsonpath.go Move, but do not refactor, printers to their own package 2017-02-23 00:28:30 -05:00
name.go NamePrinter should not hardcode scheme 2017-02-23 00:28:31 -05:00
OWNERS Add pkg/printers OWNERS 2017-03-07 22:28:27 -05:00
printers.go Move, but do not refactor, printers to their own package 2017-02-23 00:28:30 -05:00
tabwriter.go Refactor printers to separate typed printers from generic code 2017-02-23 00:28:30 -05:00
template.go Move, but do not refactor, printers to their own package 2017-02-23 00:28:30 -05:00
versioned.go Move, but do not refactor, printers to their own package 2017-02-23 00:28:30 -05:00