You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
I set my pod disruption budget's maxUnavailable to 0 in my Helm values override file. I then installed the helm chart to a minikube cluster.
What I saw:
When running helm install, I saw an error that told me the maxUnavailable had been set to -1, not the 0 that I had used.
$ helm install -f helm-consul-values.yaml ./consul-helm
Error: release pouring-monkey failed: PodDisruptionBudget.policy "pouring-monkey-consul
-server" is invalid: spec.maxUnavailable: Invalid value: -1: must be greater than or eq
ual to 0
What I expected:
I expected that setting maxUnavailable to 0 would be interpreted by the chart as a valid value.
Other context:
If I set the value to 1, everything works as expected. This suggests that a piece of logic is interpreting 0 as false and fails to use the value. Values 1 and greater are interpreted correctly.
My Helm values file has (this is the config that causes the above error):
The issue may be related to code in _helpers.tpl which checks if .Values.server.disruptionBudget.maxUnavailable but should look for if .Values.server.disruptionBudget.enabled.
The text was updated successfully, but these errors were encountered:
I've addressed the invalid -1 value in this PR. There is unfortunately still a larger issue of not being able to explicitly set this value to 0 that is a limitation of Helm templating (see PR for details).
I've changed the calculation of the default maxUnavailableto provide a valid value when replicas=1. This should fix the issue in the vast majoring of cases.
I've added documentation about how someone can directly set this value to 0, since it's more involved than it should be.
What I did:
I set my pod disruption budget's
maxUnavailable
to0
in my Helm values override file. I then installed the helm chart to a minikube cluster.What I saw:
When running
helm install
, I saw an error that told me themaxUnavailable
had been set to-1
, not the0
that I had used.What I expected:
I expected that setting
maxUnavailable
to0
would be interpreted by the chart as a valid value.Other context:
If I set the value to
1
, everything works as expected. This suggests that a piece of logic is interpreting0
asfalse
and fails to use the value. Values1
and greater are interpreted correctly.My Helm values file has (this is the config that causes the above error):
The issue may be related to code in
_helpers.tpl
which checksif .Values.server.disruptionBudget.maxUnavailable
but should look forif .Values.server.disruptionBudget.enabled
.The text was updated successfully, but these errors were encountered: