-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Enhance kubectl get crd
output to include extra metadata beyond Name and Created-At
#131599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Welcome @jaehanbyun! |
Hi @jaehanbyun. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
787ff8f
to
84d47ed
Compare
/ok-to-test |
Group seems a bit redundant given that it's already in the name. Maybe only display that when |
Does VERSIONS show all versions or only served versions? I'm usually most interested in seeing the served versions, and among the stored versions, I'm interested to know which is the stored version. |
Other possible fields to consider (maybe only for |
Run a full |
It makes sense, got it!
Currently output all versions. I think you meant you’d like to see only
Does that look good?
Thanks, I’ll give that a try! |
This is roughly the information I'd like access to. I'll defer to @kubernetes/sig-cli-leads for how the information should best be represented. I don't know if marking the storage version in this way is a good practice or not, but this is the information I consider most useful. Thanks! /assign @kubernetes/sig-cli-leads |
@jpbetz Thanks for the comment! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/remove-sig cluster-lifecycle
/remove-area kubeadm
/triage accepted |
84d47ed
to
af2f96b
Compare
kubectl get crd
output to include extra metadata beyond Name and Created-At
@jpbetz PTAL: I’ve implemented the changes so that:
And with -o wide:
Please take a look and let me know if you’d like any adjustments! |
/test pull-kubernetes-verify |
Signed-off-by: jaehanbyun <awbrg789@naver.com>
Signed-off-by: jaehanbyun <awbrg789@naver.com>
- Add crdConvertor in tableconvertor.go under staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition - Swap REST store’s default TableConvertor to use new crdConvertor via crdtable.New() - Define table columns: • Name (format:name) • Scope (Cluster or Namespaced) • Versions (comma-separated, sorted list of served versions, with `(storage)` suffix for the storage version) • Created At (RFC3339 timestamp) • Group (API group of the CRD) • Kind (CustomResource kind) • ShortNames (comma-separated) • Established (boolean) - Add unit tests Signed-off-by: jaehanbyun <awbrg789@naver.com>
af2f96b
to
a12b18b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great - thank you! I've personally wanted to see more of that information when getting CRDs.
/lgtm
/approve
/label tide/merge-method-sqaush
@soltysh: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
LGTM label has been added. Git tree hash: a5d8a977fa1851fa3489a83861ef01f65d5d628a
|
/label tide/merge-method-squash |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jaehanbyun, soltysh The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @sttts |
@jpbetz, could you take a look at this PR when you have a moment? Thanks! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Enhance kubectl get crd output to include extra metadata beyond Name and Created-At for better visibility of CustomResourceDefinitions.
NAME
andCREATED AT
):Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
This PR implements a default TableConvertor for CRDs.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: