Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Provide a valid maxUnavailable value when using a single replica #60

Merged
merged 1 commit into from
Nov 12, 2018

Conversation

adilyse
Copy link
Contributor

@adilyse adilyse commented Nov 10, 2018

This adds a condition to set maxUnavailable to 0 when replicas=1.
Previously, the logic returned an invalid value of -1. (See #58 )

The larger issue of not being able to set something explicitly to 0
remains, as this is a limitation of the way helm templating works.
For more information, see:

Helm documentation that a numerical 0 is treated identically to null:
https://docs.helm.sh/chart_template_guide/#if-else

Github issue for this:
helm/helm#3164

Additionally cleans up some test descriptions for greater clarity.

This adds a condition to set `maxUnavailable` to 0 when replicas=1.
Previously, the logic returned an invalid value of `-1`.

The larger issue of not being able to set something explicitly to 0
remains, as this is a limitation of the way helm templating works.
For more information, see:

Helm documentation that a numerical 0 is treated identically to null:
https://docs.helm.sh/chart_template_guide/#if-else

Github issue for this:
helm/helm#3164
Copy link

@topfunky topfunky left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@anubhavmishra
Copy link
Member

anubhavmishra commented Nov 10, 2018

@adilyse I am sure it was an interesting journey to this PR!

@adilyse adilyse merged commit 859d8ed into master Nov 12, 2018
@adilyse adilyse deleted the bugfix/gh-58 branch November 12, 2018 18:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants