kubectl
kubectl copied to clipboard
Improving legibility of `kubectl describe configmap` output
What would you like to be added:
I would like to change the way kubectl describve configmap outputs data values.
Why is this needed:
This is needed to improve legibility of the output and can also be used to make parsing of the output better.
This is the current output style.
kubectl create configmap sample --from-literal=sample1=value1 --from-literal=sample2=value2
And I propose the output to look like -
Name: sample
Namespace: default
Labels: <none>
Annotations: <none>
Data
====
sample1:
----
value1
sample2:
----
value2
BinaryData
====
Events: <none>
Where the value of the first key is separated from the next key by a new line. We could also use a different separator value.
I have identified the code where we need to make changes and if assigned to me, would fix it right away
/triage accepted
This seems to be a general issue with the describe printer, because it is simply printing to the write buffer directly. There are many improvements that could be made here. I think one thing to consider here is that we should probably add more ----
style line breaks to make the boundaries of fields more obvious to the eye.
/assign
@mpuckett159 , I agree, but I feel there might have to be a larger discussion in case we need to modify the generic behaviour of the describe printer
In any case, since this issue is now accepted, I'll just assign it to myself and work on it