-
Notifications
You must be signed in to change notification settings - Fork 40.9k
Added --depth flag to get fields recursively upto certain depth #127820
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
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? |
/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 🙂. |
Nice work @ak20102763 ! Are you going to still actively working on this PR? If you are then I can pick up another separate issue. This issue has now been prioritized. I would love to have this feature. |
Thanks @cmwylie19. This feature is cool to have. I would like to continue working on this PR. PTAL and let me know if any changes are needed. |
/cc @ardaguclu added integration tests. Schema used in unit tests comes from the file where we have test schema, so having elaborate units tests will not be a problem. PTAL. |
/assign @ardaguclu |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
flag usage docs updated Resolved conflicts in explain.go
[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 |
/remove-lifecycle rotten |
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