trinodb / charts

Apache License 2.0
133 stars 149 forks source link

Fix nil pointer evaluating interface #180

Closed florianMalbranque closed 3 weeks ago

florianMalbranque commented 4 weeks ago

Upgrading to 0.23.0, I get this error

Error: template: trino/templates/ingress.yaml:33:25: executing "trino/templates/ingress.yaml" at <include "trino.fullname" .>: error calling include: template: trino/templates/_helpers.tpl:15:14: executing "trino.fullname" at <.Values.fullnameOverride>: nil pointer evaluating interface {}.fullnameOverride
helm.go:84: [debug] template: trino/templates/ingress.yaml:33:25: executing "trino/templates/ingress.yaml" at <include "trino.fullname" .>: error calling include: template: trino/templates/_helpers.tpl:15:14: executing "trino.fullname" at <.Values.fullnameOverride>: nil pointer evaluating interface {}.fullnameOverride

This PR aims to fix nil pointer evaluating interface, by using $, which references the global scope in order to access the Values as expected.

florianMalbranque commented 4 weeks ago

@nineinchnick 👋 PTAL

nineinchnick commented 4 weeks ago

Can you also add a test, so we can avoid regressions like this in future?

florianMalbranque commented 3 weeks ago

Sure

florianMalbranque commented 3 weeks ago

@nineinchnick PTAL