redpanda-data / helm-charts

Redpanda Helm Chart
http://redpanda.com
Apache License 2.0
77 stars 97 forks source link

Charts fail on Helm 3.10 around eq/ne nil #1531

Closed JFlath closed 1 month ago

JFlath commented 1 month ago

`### What happened?

In various places, trying to use the RP helm chart with Helm 3.10 (as downloaded from Helm) fails with an error along the lines of:

(Tweaking the chart gives a different first instance of this happening, but it's the same form of error)

Error: template: redpanda/templates/tests/test-schemaregistry-status.yaml:26:11: executing "redpanda/templates/tests/test-schemaregistry-status.yaml" at <include "full.labels" .>: error calling include: template: redpanda/templates/_helpers.tpl:43:11: executing "full.labels" at <include "redpanda.FullLabels" (dict "a" (list .))>: error calling include: template: redpanda/templates/_helpers.go.tpl:46:8: executing "redpanda.FullLabels" at <ne $values.commonLabels (coalesce nil)>: error calling ne: uncomparable type map[string]interface {}: map[]

What did you expect to happen?

Chart templates/works without issue

How can we reproduce it (as minimally and precisely as possible)?. Please include values file.

$ helm template redpanda redpanda/redpanda --version 5.8.8

Error: template: redpanda/templates/tests/test-schemaregistry-internal-tls-status.yaml:28:11: executing "redpanda/templates/tests/test-schemaregistry-internal-tls-status.yaml" at <include "full.labels" .>: error calling include: template: redpanda/templates/_helpers.tpl:43:11: executing "full.labels" at <include "redpanda.FullLabels" (dict "a" (list .))>: error calling include: template: redpanda/templates/_helpers.go.tpl:46:8: executing "redpanda.FullLabels" at <ne $values.commonLabels (coalesce nil)>: error calling ne: uncomparable type map[string]interface {}: map[]

Anything else we need to know?

As discussed, seems to relate to the version of Go used for that Helm release: https://github.com/redpanda-data/helm-charts/issues/1454

Which are the affected charts?

No response

Chart Version(s)

5.8.8

Cloud provider

nil

JIRA Link: K8S-363

chrisseto commented 1 month ago

Some additional context: This issue pops up most frequently with users of (older?) versions of ArgoCD. It's happened enough that we should try to implement a workaround within gotohelm.

We'll want to add some nix recipes for installing the head and tail versions of helm so we can easily test against a matrix of the versions.

For the actual implementation we can either shim in our own version of ne or update the transpilation of != to have additional guards around it.