Skip to content
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

kubectl explain not re-wrapping lines #1623

Open
dhaiducek opened this issue Jul 15, 2024 · 2 comments · May be fixed by kubernetes/kubernetes#126533
Open

kubectl explain not re-wrapping lines #1623

dhaiducek opened this issue Jul 15, 2024 · 2 comments · May be fixed by kubernetes/kubernetes#126533
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@dhaiducek
Copy link

What happened:

A description like this block that wraps at 100 characters:

 // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pulvinar in libero id sagittis.
 // Aliquam sem enim, vehicula et urna ac, vehicula ullamcorper sem. Morbi turpis arcu, aliquet at 
 // eros quis, sodales dignissim eros. Quisque ut lectus quis magna maximus elementum a nec felis. 
 // Nulla ultricies pulvinar quam, id tincidunt. 

Appears like this in kubectl explain, with weird line breaks:

key <type>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pulvinar in
  libero id sagittis.
  Aliquam sem enim, vehicula et urna ac, vehicula ullamcorper sem. Morbi turpis 
  arcu, aliquet at 
  eros quis, sodales dignissim eros. Quisque ut lectus quis magna maximus 
  elementum a nec felis. 
  Nulla ultricies pulvinar quam, id tincidunt.

What you expected to happen:

OpenAPIv3 is formatted as Markdown, so I'd expect kubectl explain to reflow each description to realign line breaks, according to the rules of Markdown (i.e. respecting lists and the like):

key <type>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pulvinar in
  libero id sagittis. Aliquam sem enim, vehicula et urna ac, vehicula 
  ullamcorper sem. Morbi turpis arcu, aliquet at eros quis, sodales dignissim 
  eros. Quisque ut lectus quis magna maximus elementum a nec felis. Nulla 
  ultricies pulvinar quam, id tincidunt.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes client and server versions (use kubectl version):
    Client Version: v1.29.3
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.28.9+8ca71f7
    
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release): MacOS (Darwin)
@dhaiducek dhaiducek added the kind/bug Categorizes issue or PR as related to a bug. label Jul 15, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 15, 2024
@mpuckett159
Copy link
Contributor

/triage accepted
/kind feature

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/feature Categorizes issue or PR as related to a new feature. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 17, 2024
@mpuckett159 mpuckett159 removed the kind/bug Categorizes issue or PR as related to a bug. label Jul 17, 2024
@ah8ad3
Copy link
Member

ah8ad3 commented Jul 30, 2024

Thanks for raising this, @dhaiducek kubectl explain already has that wrap mechanism, but it may be acting wired in some scenarios. I will take a look at this.
/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants