Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

helm-tool inject sometimes omits the context (prefix) of commented out values in the generated markdown #25

Open
wallrj opened this issue Feb 28, 2024 · 1 comment
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 originally added a new block to the end of the existing values.yaml file:

> podDisruptionBudget:
>   # Enable or disable the PodDisruptionBudget resource.
>   #
>   # This prevents downtime during voluntary disruptions such as during a Node upgrade.
>   # For example, the PodDisruptionBudget blocks `kubectl drain`
>   # if it is used on the Node where the only remaining approver-policy
>   # Pod is currently running.
>   enabled: false
> 
>   # Configures the minimum available pods for disruptions.
>   # Cannot be used if `maxUnavailable` is set.
>   # +docs:property
>   # minAvailable: 1
> 
>   # Configures the maximum unavailable pods for disruptions.
>   # Cannot be used if `minAvailable` is set.
>   # +docs:property
>   # maxUnavailable: 1
> 

But when I ran make generate-helm-docs it added minAvailable and maxUnavailable as global values, rather than prefixed like podDisruptionBudget.minAvailable .

It seemed to only be a problem when the commented out values were the last in the file.
Adding a trailing foo: bar or moving the new block above some other existing blocks fixed the problem.

/kind bug

@jetstack-bot
Copy link
Contributor

@wallrj: The label(s) kind/bug cannot be applied, because the repository doesn't have them.

In response to this:

In cert-manager/approver-policy#383 I originally added a new block to the end of the existing values.yaml file:

podDisruptionBudget:

Enable or disable the PodDisruptionBudget resource.

This prevents downtime during voluntary disruptions such as during a Node upgrade.

For example, the PodDisruptionBudget blocks kubectl drain

if it is used on the Node where the only remaining approver-policy

Pod is currently running.

enabled: false

Configures the minimum available pods for disruptions.

Cannot be used if maxUnavailable is set.

+docs:property

minAvailable: 1

Configures the maximum unavailable pods for disruptions.

Cannot be used if minAvailable is set.

+docs:property

maxUnavailable: 1

But when I ran make generate-helm-docs it added minAvailable and maxUnavailable as global values, rather than prefixed like podDisruptionBudget.minAvailable .

It seemed to only be a problem when the commented out values were the last in the file.
Adding a trailing foo: bar or moving the new block above some other existing blocks fixed the problem.

/kind bug

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

No branches or pull requests

2 participants