Immediately use replica value to allow 0
What does this MR do?
Allows setting replicas to 0 through chart values by dispensing the use of Helm's default
function in rendering the value of spec.replicas
for the Deployment
template.
Fixes #454 (closed).
Why was this MR needed?
Setting replicas
to 0 currently renders a Deployment with 1 replica. This is due to 0 being a false-y value overwritten by default
.
What's the best way to test this MR?
Try rendering templates with helm template
and check that passing --set replicas=0
reflects spec.replicas: 0
for the Deployment resource. A chart unit test was added to guarantee future changes won't interfere with the explicit setting of 0 replicas.