helm-docs
helm-docs copied to clipboard
[Enhancement] Set custom delimiter, if value in line is too long
Hello.
This project looks very good and if is possible, I would like to suggest this enhancement.
In my case, we have in helm chart defined custom parameters for Kafkas topic, something like this:
kafka:
# -- Set JVM parameters `-Xms` and `-Xmx` here.
heapSize: "256M"
# -- Persistent volume size.
storage: "1Gi"
topics:
# -- Topics parameters
config: "max.message.bytes=10000000,retention.bytes=134217728,retention.ms=3600000,message.timestamp.difference.max.ms=3600000,message.timestamp.type=LogAppendTime"
As you can see, when this is rendered by HelmDocs, as a result is very long line :(. All descriptions are hidden for only one long line and you must scroll to the right to see them.
Workaround for me looks like this:
kafka:
# -- Set JVM parameters `-Xms` and `-Xmx` here.
heapSize: "256M"
# -- Persistent volume size.
storage: "1Gi"
topics:
# -- Topics parameters
# @default -- `max.message.bytes=10000000,` \ <br> `retention.bytes=134217728,` \ <br> `retention.ms=3600000,` \ <br> `message.timestamp.difference.max.ms=3600000,` \ <br> `message.timestamp.type=LogAppendTime`
config: "max.message.bytes=10000000,retention.bytes=134217728,retention.ms=3600000,message.timestamp.difference.max.ms=3600000,message.timestamp.type=LogAppendTime"
It looks strange after rendering, but it is more readable. As a side problem is, that we lost automation :(. If somebody add / change some Kafka parameters and forget to reflect this change in @default
flag, solution will be confusing.
My idea is, add parameter for set delimiter in that case. Something like this:
kafka:
# -- Set JVM parameters `-Xms` and `-Xmx` here.
heapSize: "256M"
# -- Persistent volume size.
storage: "1Gi"
topics:
# -- Topics parameters
# @delimiter=,
config: "max.message.bytes=10000000,retention.bytes=134217728,retention.ms=3600000,message.timestamp.difference.max.ms=3600000,message.timestamp.type=LogAppendTime"
After rendering I hope, that all settings from config string field will be in markdown on separated single line.
Of course, this is just a idea. If you consider it as a worthless, please, close this issue.
I agree, this would be very helpful.
I think this is a good idea. I'd be happy to look at a PR, but at present, I don't have time to do the work myself. Maybe what you're asking for is related to this PR: https://github.com/norwoodj/helm-docs/pull/106?
Hi @norwoodj .
Thank you for notified me for this PR. From my perspective looks good for column Key
. But in this issue I would like something similar for Default
column. It is possible to do same thing for column Default
too, please? Of course, it can be done in different PR ...
Thank you.