Commit Graph

27 Commits

Author SHA1 Message Date
Clayton Coleman
3230a0b4fd
Support Table and PartialObjectMetadata on watch
Clean up the code paths that lead to objects being transformed and output with negotiation.
Remove some duplicate code that was not consistent. Now, watch will respond correctly to
Table and PartialObjectMetadata requests. Add unit and integration tests.

When transforming responses to Tables, only the first watch event for a given type will
include the columns. Columns will not change unless the watch is restarted.

Add a volume attachment printer and tighten up table validation error cases.

Disable protobuf from table conversion because Tables don't have protobuf because they
use `interface{}`
2019-03-08 13:03:59 -05:00
Jordan Liggitt
2b1a2d361f Use tabwriter with remembered column widths 2019-01-01 22:27:36 -05:00
Jordan Liggitt
bd559e247c
tolerate missing column headers in server-side print output 2018-07-19 20:55:01 -04:00
Jordan Liggitt
86c2158bb0
Fix up legacy printer table adapter 2018-06-07 13:20:04 -04:00
David Eads
e1fca70506 slim down printer interface 2018-05-04 11:15:35 -04:00
David Eads
04384481cd remove unnecessary encoder 2018-04-30 14:55:15 -04:00
David Eads
6900f8856f rest mappings cannot logically be object converters 2018-04-26 12:47:25 -04:00
juanvallejo
a3a430ce01
wire through humanreadable flags 2018-04-03 13:59:35 -04:00
Jordan Liggitt
3b8a570437
Restore show-kind function when printing multiple kinds 2018-04-01 00:24:25 -04:00
Chao Wang
71a1970bf6 --show-all is inert in v1.11 2018-03-21 09:13:21 +08:00
juanvallejo
9946374f82
handle Table response in client
This patch adds support for the "server-side GET operation"
introduced by pull/40848 and proposed by kubernetes/community#363.
2018-02-23 10:41:04 -05:00
Kubernetes Submit Queue
e87f1cbc88
Merge pull request #52942 from amitkumarj441/patch-3
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix typo

**What this PR does / why we need it**: To fix typo in annotations

**Release note**:

```release-note
NONE
```
2018-02-06 07:10:00 -08:00
Clayton Coleman
d07a608607 Promote v1alpha1 meta to v1beta1
No code changes, just renames
2018-02-02 14:00:45 -05:00
Clayton Coleman
d2a62fd422 Table printers and server generation should always copy ListMeta
Tables should be a mapping from lists, so if the incoming object has
these add them to the table. Allows paging over server side tables.
Add tests on the generic creater and on the resttest compatibility.
2017-11-17 10:30:32 -05:00
zhengjiajin
d9dbfc7861 fix issue(51245)kubectl printObj should not print header when occur error 2017-10-20 18:01:09 +08:00
Amit Kumar Jaiswal
20d748f465 Fix typo 2017-09-23 20:17:34 +05:30
tianshapjq
d698404adc typo in annotations 2017-09-14 16:32:28 +08:00
Clayton Coleman
6bd0c38908
Add a new default printer handler for HumanReadable
Refactors and removes the need for the more complex old code,
temporarily limits what output is shown for truly unknown objects (a
follow up change will allow server side handling and generic fallback),
and removes all of the generic printers in favor of a single code path.
2017-07-05 00:31:41 -04:00
Clayton Coleman
b1abedbc64
Wrap HumanReadablePrinter in tab output unless explicitly asked not to
Fixes an accidental regression. In general, we should not accept an
incoming tabwriter and instead manage at a higher level. Fix the bug and
add a comment re: future refactoring.
2017-06-05 22:06:38 -04:00
Kubernetes Submit Queue
2629bf79f2 Merge pull request #46265 from waseem/printers-genericity
Automatic merge from submit-queue (batch tested with PRs 41563, 45251, 46265, 46462, 46721)

Denote if a printer is generic.

This fixes #38779.

This allows us to avoid case in which printers.GetStandardPrinter
returns nil for both printer and err removing any potential panics that
may arise throughout kubectl commands.

Please see #38779 and #38112 for complete context.
2017-06-02 19:53:40 -07:00
Waseem Ahmad
8442a118ea Denote if a printer is generic.
This fixes #38779.

This allows us to avoid case in which printers.GetStandardPrinter
returns nil for both printer and err removing any potential panics that
may arise throughout kubectl commands.

Please see #38779 and #38112 for complete context.

Add comment explaining adding handlers to printers.HumanReadablePrinter
also remove an unnecessary conversion of printers.HumanReadablePrinter
to printers.ResourcePrinter.
2017-05-31 13:02:23 +05:30
Clayton Coleman
7ce63eb608
Refactor printers to support rendering as a Table
Return tables from the server.
2017-05-29 18:30:10 -04:00
xilabao
697efd1baf De-duplication in printer 2017-05-10 08:45:20 +08:00
Fabiano Franz
b276f17b6d Smarter get printer for generic resources 2017-04-17 15:42:47 -03:00
Jordan Liggitt
31b3e01f1e
Fix error printing objects from kubectl get -w 2017-02-28 22:36:26 -05:00
Clayton Coleman
3704ceffd2
Refactor printers to separate typed printers from generic code 2017-02-23 00:28:30 -05:00
Clayton Coleman
6d1c7308a5
Move, but do not refactor, printers to their own package 2017-02-23 00:28:30 -05:00