-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Added --depth flag to get fields recursively upto certain depth #127820
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ak20102763 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 |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
Hi @ak20102763. 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. |
Hi @ardaguclu / @apelisse, if you think this feature is reasonable to add, can you review this PR and suggest changes? |
flag usage docs updated Added depth test cases for plaintext template
/cc @apelisse |
I guess this is unlikely to get merged because of large code change and potential new flag, though I will keep this PR open in case someone finds this feature interesting in future. Feel free to suggest changes if any 🙂. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds new flag
--depth
tokubectl explain <resource> --recursive
command to limit the level up to which fields are recursively explained. Users can now limit the depth of field explanations when using the recursive option, providing more control over the output. It enhances the UX by giving more flexibility.Which issue(s) this PR fixes:
Fixes kubernetes/kubectl#1659
Special notes for your reviewer:
--depth
support added inkubectl/pkg/cmd/explain/explain.go
plaintext
andplaintext-openapiv2
--depth
inputsDoes this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
Example:
When the
--depth
flag is not used, the entire structure of the resource fields will be recursively explained. For ex:By using the --depth flag, user can now limit how deep the recursive explanation goes. For ex, setting --depth=2 will limit the output to only two levels of fields