Skip to content

charts: tls: null aborts the render of nats, qdrant and postgres #4115

Closed as not planned

Description

Describe the bug
Three app charts read .Values.tls.enabled directly, and tls: null in the values, which their values.schema.json accepts and a HelmRelease override delivers unpruned, aborts the whole render with nil pointer evaluating interface {}.enabled:

helm template x packages/apps/<chart> --namespace tenant-test --set '_cluster.cluster-domain=cozy.local' --set tls=null
  • nats fails in templates/_tls.tpl (nats.tls.enabled)
  • qdrant fails in templates/_helpers.tpl (qdrant.tls.enabled)
  • postgres fails in templates/db.yaml through postgres.tls.enabled

rabbitmq renders, because its helper goes through dig "enabled" nil (.Values.tls | default dict) and then kindIs "invalid". mongodb renders on tls: null but has a separate hole one step earlier: without _cluster it dies on index .Values._cluster "cluster-domain" (#4046). opensearch has the same class on dashboards: null, nodeRoles: null and images: null.

Environment

  • Cozystack main, 2026-09-07

To Reproduce

  1. Run the command above for nats, qdrant or postgres

Expected behaviour
A null the schema admits renders as the default, or is refused with a values error naming the field.

Actual behaviour
The HelmRelease fails and the operator gets a template stack trace.

Additional context
The rabbitmq helper shape is the fix for the three; the opensearch reads and the mongodb _cluster read want the same guard. Found while reviewing #2683 and #2682.

Checklist

  • I have checked the documentation
  • I have searched for similar issues
  • I have included all required information
  • I have provided clear steps to reproduce
  • I have included relevant logs

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)
    on Sep 7, 2026
  2. lexfrei commented on Sep 10, 2026

    @lexfrei
    ContributorAuthor

    Same class, three more keys, in a chart this issue does not list. In packages/apps/opensearch, dashboards: null dies at templates/security.yaml:116:16 and nodeRoles: null at templates/opensearch.yaml:43:34, both on a nil dereference from a key the schema accepts.

    replicas: null is the same root with a quieter symptom, and the more dangerous one: the render succeeds and emits an empty replicas: into the nodePool and into the WorkloadMonitor, opensearch.yaml:213 and :257. Nothing fails, so nothing tells you the count was dropped.

    Reachability is narrower than the tls cases: the apps API defaults these keys, so only raw Helm values get there, not an application spec. All three reproduce identically on main today, so the guard belongs with the rest of this rather than in the branch that touched those templates.

    The remedy is the one this issue already names, and rabbitmq already demonstrates it: read through (.Values.<key> | default dict) at the leaf rather than guarding the block.

  3. added
    triage/duplicateIndicates an issue is a duplicate of another issue
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
  4. lexfrei commented on Sep 23, 2026

    @lexfrei
    ContributorAuthor

    Duplicate of #3705, which covers the TLS helper in nats, qdrant, postgres and kafka. The opensearch keys from the comment above are the only new part, and they fit there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/bugCategorizes issue or PR as related to a bugtriage/duplicateIndicates an issue is a duplicate of another issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions