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

revisionHistoryLimit cannot be set to 0 #1283

Open
2 tasks done
tberreis opened this issue Dec 16, 2024 · 1 comment
Open
2 tasks done

revisionHistoryLimit cannot be set to 0 #1283

tberreis opened this issue Dec 16, 2024 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed kind/bug/confirmed a confirmed bug (reproducible).

Comments

@tberreis
Copy link

tberreis commented Dec 16, 2024

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What version of the Traefik's Helm Chart are you using?

33.2.1

What version of Traefik are you using?

3.2.2

What did you do?

In values.yaml#L26 the revisionHistoryLimit is defined with type:[integer, null];minimum:0.

In deployment.yaml#L41 the conditional if .Values.deployment.revisionHistoryLimit is false, when setting the revisionHistoryLimit to 0.
A workaround would be to use "0" (as string) but the schema does not allow a string in that case. Therefore revisionHistoryLimit cannot be set to 0.
Another solution could be to remove the if-clause and to define a default instead (e.g. the Kubernetes default of 10).

Relates to helm issue #3164.

What did you see instead?

When setting revisionHistoryLimit to 0, the revisionHistoryLimit is not part of the rendered manifest.

What is your environment & configuration?

  ...
  deployment:
    enabled: true
    kind: Deployment
    revisionHistoryLimit: 0
    ...
@mloiseleur mloiseleur added kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. and removed status/0-needs-triage labels Dec 16, 2024
@mloiseleur
Copy link
Contributor

mloiseleur commented Dec 16, 2024

Hello @tberreis ,

Thanks for this detailed bugreport. That's right, current code is not allowing this value.

It's possible to adapt the code for this. Feel free to open a PR if you need it.

There are known tricks like the one used on prometheus metrics in order to set the value even if it's 0.

@mloiseleur mloiseleur added kind/bug/confirmed a confirmed bug (reproducible). good first issue Good for newcomers help wanted Extra attention is needed and removed kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed kind/bug/confirmed a confirmed bug (reproducible).
Projects
None yet
Development

No branches or pull requests

2 participants