✨ (helm/v2-alpha): Improve generated values.yaml comment conventions (single # vs ##)#5357
Conversation
e2dad8a to
b1a0289
Compare
Update values.yaml generation to use ## for section headers and documentation blocks, following Helm chart best practices.
b1a0289 to
0e512f7
Compare
| ## Configure the controller manager deployment | ||
| ## |
There was a problem hiding this comment.
Hi @camilamacedo86 could you explain the reasoning behind this change? I was trying to find something about using double hashtags in the official docs but couldn't.
For what I was able to learn this is mostly a formatting for readme-generation tools used in the industry. Right?
There was a problem hiding this comment.
Thanks for asking!
This isn’t a Helm/YAML “requirement” (so you won’t find it mandated in the Helm docs), it’s mainly a usability convention for values.yaml files.
In values.yaml we have two different kinds of commented lines:
- Commented-out values users may want to enable
These use a single#, so if someone removes that#(manually or via an editor “uncomment selection” shortcut) the line becomes valid YAML, e.g.:
# fullnameOverride: ""
- Pure documentation / section headers / prose
These should never become YAML keys/values. If they were# Arguments, and someone bulk-uncomments a block, that line would becomeArguments(invalid YAML) and could breakhelm install -f values.yamlsince values files are plain YAML.
So we use ## for those docs/headers (and keep separator lines as ##/## ...) so that a “remove one leading #” operation still leaves them commented (# ...) and the file stays valid. This is exactly what the change is doing in this PR (e.g. # Arguments → ## Arguments).
This convention is also pretty common in the ecosystem (for example, the prometheus-community chart uses lots of ## doc lines and single-# commented examples).
There was a problem hiding this comment.
I updated the title to better clarify.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, vitorfloriano The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Update values.yaml generation to use ## for section headers and documentation blocks, following Helm chart best practices.