-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Make kubectl describe more tolerant of newlines #66841
Conversation
Inline scripts may use newlines in these fields, and properly indenting makes the output more readable: ``` Command: /bin/bash -c #!/bin/bash echo "inline script should be indented" ```
Break env var values with newlines so they form a consistent left alignment.
Make annotations with newlines display a more consistent left edge, and indent the value when the annotation is too long to give the value more space. Shorten the width of the trimmed annotation to a value more consistent with our `-o wide` value. Instead of putting the key and value flush with a `=` separator, make annotations closer to fields than to labels by using `: ` as a separator.
@kubernetes/sig-cli-bugs |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: juanvallejo, smarterclayton The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Automatic merge from submit-queue (batch tested with PRs 66911, 66841). If you want to cherry-pick this change to another branch, please follow the instructions here. |
Newlines in the
command
,args
,env.value
, orannotations
fields are not uncommon. Wrap and indent these fields so that describe is more readable.Before:
After:
Annotations when wrapping: