SchwarzIT / node-red-chart

Node-red Helm Chart
Apache License 2.0
36 stars 23 forks source link

Error when enabling certificate and rendering templates #301

Closed ErwinSteffens closed 6 months ago

ErwinSteffens commented 7 months ago

What happened?

When enabling certificate an error happens while rendering the templates:

Error: INSTALLATION FAILED: template: node-red/templates/certificates.yaml:8:24: executing "node-red/templates/certificates.yaml" at <.Release.Namespace>: nil pointer evaluating interface {}.Namespace

How can we reproduce this?

ingress:
  enabled: true
  tls: 
    - secretName: node-red
      hosts:
      - node-red.com
      certificate:
        enabled: true
        issuerRef:
          kind: ClusterIssuer
          name: letsencrypt

Helm Chart version

0.28.0

Search

Code of Conduct

Additional context

None

dirien commented 6 months ago

Hey @ErwinSteffens,

thanks for the issue and PR.

I have trouble to understand what the issue is your PR is fixing?

ErwinSteffens commented 6 months ago

.Release.Namespace is used within the range block. The range sets the scope of . to the item being iterated. So it cannot find Release.Namespace on . and it give the error shown in the description.

dirien commented 6 months ago

@ErwinSteffens, nice find! 👍 Thanks for the PR, it's merged!