mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue (batch tested with PRs 44222, 44614, 44292, 44638) Smarter generic getters and describers Makes printers and describers smarter for generic resources. This traverses unstructured objects and prints their attributes for generic resources (TPR, federated API, etc) in `kubectl get` and `kubectl describe`. Makes use of the object's field names to come up with a best guess for describer labels and get headers, and field value types to understand how to better print it, indent, etc. A nice intermediate solution while we don't have [get and describe extensions](https://github.com/kubernetes/community/pull/308). Examples: ``` $ kubectl get serviceclasses NAME KIND BINDABLE BROKER NAME OSB GUID user-provided-service ServiceClass.v1alpha1.servicecatalog.k8s.io false ups-broker 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468 ``` ``` $ kubectl describe serviceclasses/user-provided-service Name: user-provided-service Namespace: Labels: <none> Annotations: FOO=BAR openshift.io/deployment.phase=test OSB Metadata: <nil> Kind: ServiceClass Metadata: Self Link: /apis/servicecatalog.k8s.io/v1alpha1/serviceclassesuser-provided-service UID: 1509bd96-1b05-11e7-98bd-0242ac110006 Resource Version: 256 Creation Timestamp: 2017-04-06T20:10:29Z Broker Name: ups-broker Bindable: false Plan Updatable: false OSB GUID: 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468 API Version: servicecatalog.k8s.io/v1alpha1 Plans: Name: default OSB GUID: 86064792-7ea2-467b-af93-ac9694d96d52 OSB Free: true OSB Metadata: <nil> Events: <none> ``` **Release note**: ```release-note Improved output on 'kubectl get' and 'kubectl describe' for generic objects. ``` PTAL @pmorie @pwittrock @kubernetes/sig-cli-pr-reviews |
||
---|---|---|
.. | ||
async | ||
bandwidth | ||
chmod | ||
chown | ||
config | ||
configz | ||
crlf | ||
dbus | ||
ebtables | ||
env | ||
errors | ||
exec | ||
flock | ||
framer | ||
goroutinemap | ||
hash | ||
i18n | ||
initsystem | ||
interrupt | ||
intstr | ||
io | ||
ipconfig | ||
iptables | ||
json | ||
keymutex | ||
labels | ||
limitwriter | ||
logs | ||
maps | ||
metrics | ||
mount | ||
net | ||
netsh | ||
node | ||
oom | ||
parsers | ||
procfs | ||
rand | ||
removeall | ||
resourcecontainer | ||
rlimit | ||
runtime | ||
selinux | ||
sets | ||
slice | ||
strings | ||
sysctl | ||
system | ||
tail | ||
taints | ||
term | ||
threading | ||
tolerations | ||
uuid | ||
validation | ||
version | ||
wait | ||
workqueue/prometheus | ||
yaml | ||
BUILD | ||
doc.go | ||
template.go | ||
template_test.go | ||
umask.go | ||
umask_windows.go | ||
util.go | ||
util_test.go |