k8s-at-home/library-charts

Set env variables have no effect when value is 0 or false

ronny35 opened this issue · 6 comments

Details

Helm chart name and version:

k8s-at-home: 7.3.1

What steps did you take and what happened:

When I apply env.NODE_TLS_REJECT_UNAUTHORIZED = 0 (or false), environnement variable is not deployed

Relevant Helm values:

env:
NODE_TLS_REJECT_UNAUTHORIZED: 0

What did you expect to happen:

Must be present.

bjw-s commented

Hi! Thanks for taking the time to raise this issue. The correct way to pass truthy (true/false/1/0, etc) environment variables in Helm charts is by quoting them.

I believe this snippet should work:

env:
  NODE_TLS_REJECT_UNAUTHORIZED: "0" # or "false"

Hi @bjw-s,

I have the same error.

@ronny35 What @bjw-s is trying to tell you:
Env-Vars should always be strings, so need quotes.

He is not saying he has the same error.

bjw-s commented

I've added an explicit unit test (3fa4861) to verify that the quoted "0" works, and it works as expected

@bjw-s Can also be closed afaik.

bjw-s commented

I am closing this issue for now. If the problem still occurs for you, please don't hesitate to comment again.