Skip to content

NATS chart merge of podTemplate replaces default content #1354

Closed

Description

I am running into an issue with the managed NATS chart v0.9.0 in Cozystack v0.35.1 where it appears the podTemplate merging of the nats container's spec is not working correctly. If I transfer the generated values for the cozy-nats system chart to the latest upstream chart, the bug no longer happens, but I can replicate it with helm template --dry-run=server using the cozy-nats chart from the repo in the cluster.

The resulting container spec in the StatefulSet looks like this:

    spec:
      containers:
        - image: nats:2.10.17-alpine
          name: nats
          resources:
            limits:
              cpu: 500m
              ephemeral-storage: 2Gi
              memory: 256Mi
            requests:
              cpu: "0.05"
              ephemeral-storage: "53687091"
              memory: "268435456"

As a result of the missing volumes and other parameters, the service does not work properly and loads the default config file from the NATS container. Setting something in config.merge and config.resolver is also required because even setting both to null is lost by Flux when converting to JSON and the template will fail if config.merge == {} and I assume config.resolver would have the same behavior, although I wasn't able to test it to verify.

Values used:

replicas: 3
resourcesPreset: micro
storageClass: local
external: false
jetstream:
  enabled: true
  size: 10Gi
users:
  stalwart: {}
config:
  merge:
    B:
      cluster:
        name: example-staging
  resolver:
    enabled: false

Activity

  1. insignia96 commented on Nov 4, 2025

    @insignia96
    ContributorAuthor

    #1571 addresses the core issue, but I ran into some related issues when trying the fixes in v0.37.4 and I opened the new PR with some minor fixes.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions