kubernetes/pkg/printers
Kubernetes Submit Queue 0f9b5e9fc0
Merge pull request #60269 from smarterclayton/crd_printing
Automatic merge from submit-queue (batch tested with PRs 60324, 60269, 59771, 60314, 59941). 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>.

Implement a stub server printer for CRDs

This wires up TableConvertor to CRDs and puts a basic implementation in place for custom paths. However, since our OpenAPISchema can't store OpenAPI extension fields there is no way to expose the custom column piece that get.go supports today (`x-kubernetes-print-columns`). That piece can be implemented separately and needs discussion.

As this is purely exposing the default interface, very low risk. Will add an e2e test that covers this under a registered CRD.

@soltysh @sttts @kubernetes/sig-api-machinery-pr-reviews

A couple of options for wiring up the actual definition:

1. add a new "extensions" map to spec.validation
   1. Downside: won't handle future child nested fields, not the correct schema
2. try to change the OpenAPISchema3 field to support extensions
   1. Would require a breaking protobuf change, is also very difficult
   2. Could store the entire schema as opaque JSON and then parse on load (might be the right thing anyway)
3. Support this as an annotation in 1.11 - `alpha.customresource.k8s.io/x-kubernetes-print-columns` like the CLI

Part of #58536
2018-02-24 20:01:39 -08:00
..
internalversion Merge pull request #60269 from smarterclayton/crd_printing 2018-02-24 20:01:39 -08:00
storage Promote v1alpha1 meta to v1beta1 2018-02-02 14:00:45 -05:00
.import-restrictions Restrict imports for printers 2017-02-23 00:28:31 -05:00
BUILD CRD should have server side printing 2018-02-24 13:44:05 -05:00
customcolumn_test.go pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
customcolumn.go outputs <none> for colums not found 2017-09-27 11:27:55 -07:00
humanreadable_test.go Promote v1alpha1 meta to v1beta1 2018-02-02 14:00:45 -05:00
humanreadable.go handle Table response in client 2018-02-23 10:41:04 -05:00
interface.go consolidate printer OutputOpts w PrintOpts 2017-11-20 14:49:23 -05:00
json.go Denote if a printer is generic. 2017-05-31 13:02:23 +05:30
jsonpath.go Denote if a printer is generic. 2017-05-31 13:02:23 +05:30
name.go collapse printing paths 2018-02-21 08:15:22 -05:00
OWNERS Add pkg/printers OWNERS 2017-03-07 22:28:27 -05:00
printers.go update -o name format to kind.group/name 2018-02-15 10:33:06 -05:00
tabwriter.go
template.go Denote if a printer is generic. 2017-05-31 13:02:23 +05:30
versioned.go collapse printing paths 2018-02-21 08:15:22 -05:00