zalando / zalando/postgres-operator

postgres-operator-ui chart >= 2.0.0 published without values.yaml (nil pointer panics)

Open
#3,175 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Title

postgres-operator-ui chart >= 2.0.0 published without values.yaml (nil pointer panics)

Body

What happened

Since chart version 2.0.0 (through at least 2.0.2), the postgres-operator-ui Helm chart published to opensource.zalando.com/postgres-operator/charts/postgres-operator-ui no longer contains values.yaml. Every template that reads a nested value (.Values.serviceAccount.create, .Values.service.annotations, .Values.rbac.create, .Values.ingress.enabled, etc.) fails with a nil pointer error unless the caller supplies the entire values tree explicitly:

Error: template: postgres-operator-ui/templates/serviceaccount.yaml:1:13: executing "postgres-operator-ui/templates/serviceaccount.yaml" at <.Values.serviceAccount.create>: nil pointer evaluating interface {}.create

and, once serviceAccount is set:

Error: template: postgres-operator-ui/templates/service.yaml:9:18: executing "postgres-operator-ui/templates/service.yaml" at <.Values.service.annotations>: nil pointer evaluating interface {}.annotations

Root cause (as far as I can tell)

charts/postgres-operator-ui/values.yaml is present and complete in this repository at every relevant tag, including v2.0.2 and master:
https://github.com/zalando/postgres-operator/blob/v2.0.2/charts/postgres-operator-ui/values.yaml

But the packaged tarball published to the Helm repo is missing it:

$ curl -sL https://opensource.zalando.com/postgres-operator/charts/postgres-operator-ui/postgres-operator-ui-2.0.2.tgz | tar tz
postgres-operator-ui/Chart.yaml
postgres-operator-ui/templates/NOTES.txt
postgres-operator-ui/templates/_helpers.tpl
postgres-operator-ui/templates/clusterrole.yaml
postgres-operator-ui/templates/clusterrolebinding.yaml
postgres-operator-ui/templates/deployment.yaml
postgres-operator-ui/templates/ingress.yaml
postgres-operator-ui/templates/service.yaml
postgres-operator-ui/templates/serviceaccount.yaml
postgres-operator-ui/.helmignore
postgres-operator-ui/index.yaml

For comparison:

  • postgres-operator-ui chart at 1.15.1 (the last version before 2.x) is packaged correctly, values.yaml present.
  • The sibling postgres-operator chart at 2.0.2 is also packaged correctly, values.yaml present.

So this looks like a one-off packaging mistake scoped specifically to the postgres-operator-ui chart during the 2.0.x release, similar in nature to #3149 (index.yaml not published for 2.0.1) — the release/publish step for this chart appears to be manual and has been dropping files.

Expected behavior

helm install/helm template for postgres-operator-ui >= 2.0.0 should work with no values overrides, using the same defaults shipped in the chart source (replicaCount, image, rbac, serviceAccount, resources, envs, podAnnotations, service, ingress, priorityClassName, affinity, nodeSelector, tolerations).

How to reproduce

helm repo add postgres-operator-ui-charts https://opensource.zalando.com/postgres-operator/charts/postgres-operator-ui
helm repo update
helm template test postgres-operator-ui-charts/postgres-operator-ui
# Error: template: postgres-operator-ui/templates/serviceaccount.yaml:1:13: executing ... nil pointer evaluating interface {}.create

Workaround

Explicitly pass every top-level values key (mirroring charts/postgres-operator-ui/values.yaml from source) via --set/-f.

Chart versions affected: 2.0.0, 2.0.1, 2.0.2 (not affected: 1.15.1 and earlier; not affected: sibling postgres-operator chart at the same 2.0.2 version)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with charts/postgres-operator-ui/values.yaml at v2.0.2 and compare it with the published postgres-operator-ui-2.0.2.tgz; then inspect the release/publish step that packages the chart. Re-run helm template using the repository URL, and consider the issue done when affected chart archives include values.yaml and render without values overrides.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.