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

helm-tool inject adds trailing white space to the generated markdown #26

Open
wallrj opened this issue Feb 28, 2024 · 0 comments
Open
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@wallrj
Copy link
Member

wallrj commented Feb 28, 2024

In cert-manager/approver-policy#383 I noticed some trailing white space added to the generated Helm README.

image

Perhaps it's deliberate, to generate markdown linebreaks, but it seems to put them in unusual places.

For example:

https://github.com/cert-manager/approver-policy/blob/e5203e235ef041994bc0b2fd1c8756c5108460cd/deploy/charts/approver-policy/values.yaml#L6-L11

  # This option makes it so that the "helm.sh/resource-policy": keep
  # annotation is added to the CRD. This will prevent Helm from uninstalling
  # the CRD when the Helm release is uninstalled.
  # WARNING: when the CRDs are removed, all cert-manager custom resources
  # (Certificates, Issuers, ...) will be removed too by the garbage collector.
  keep: true

Becomes:

https://github.com/cert-manager/approver-policy/blob/e5203e235ef041994bc0b2fd1c8756c5108460cd/deploy/charts/approver-policy/README.md#L16-L23

#### **crds.keep** ~ `bool`
> Default value:
> ```yaml
> true
> ```


This option makes it so that the "helm.sh/resource-policy": keep annotation is added to the CRD. This will prevent Helm from uninstalling the CRD when the Helm release is uninstalled. WARNING: when the CRDs are removed, all cert-manager custom resources  
(Certificates, Issuers, ...) will be removed too by the garbage collector.

Notice how WARNING line (which should be on it's own line) has been flowed in to the previous sentence.
And the line break (double trailing space) has been added half way into the WARNING sentence.

image

@wallrj wallrj added the kind/bug Categorizes issue or PR as related to a bug. label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant