Skip to content

✨ (helm/v2-alpha): Improve generated values.yaml comment conventions (single # vs ##)#5357

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
camilamacedo86:helm-values
Jan 6, 2026
Merged

✨ (helm/v2-alpha): Improve generated values.yaml comment conventions (single # vs ##)#5357
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
camilamacedo86:helm-values

Conversation

@camilamacedo86
Copy link
Member

Update values.yaml generation to use ## for section headers and documentation blocks, following Helm chart best practices.

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 6, 2026
Update values.yaml generation to use ## for section headers and
documentation blocks, following Helm chart best practices.
Comment on lines +9 to +10
## Configure the controller manager deployment
##
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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: ""
  1. 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 become Arguments (invalid YAML) and could break helm install -f values.yaml since 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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the title to better clarify.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks!

@camilamacedo86 camilamacedo86 changed the title ✨ (helm/v2-alpha): Follow Helm best practices for values.yaml comments ✨ (helm/v2-alpha): Improve generated values.yaml comment conventions (single # vs ##) Jan 6, 2026
Copy link
Contributor

@vitorfloriano vitorfloriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 2026
@k8s-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 193a930 into kubernetes-sigs:master Jan 6, 2026
38 checks passed
@camilamacedo86 camilamacedo86 deleted the helm-values branch January 6, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants