Skip to content

Conversation

@wpnpeiris
Copy link

Summary

As proposed here add a Helm chart for NACK JetStream resources that renders Kubernetes Custom Resources (CRs) for:

Stream (streams.jetstream.nats.io)

Consumer (consumers.jetstream.nats.io)

KeyValue (keyvalues.jetstream.nats.io)

ObjectStore (objectstores.jetstream.nats.io)

It separates from the NACK controller chart to keep controller lifecycle independent from application resources.

What this PR includes

A new application chart (e.g., charts/jetstream-resources/) with:

Templates

  • templates/streams.yaml — loops over values.streams[]

  • templates/consumers.yaml — loops over values.consumers[]

  • templates/keyvalues.yaml — loops over values.keyValues[]

  • templates/objects.yaml — loops over values.objectStores[]

Values schema (high-level)

nats:
 
streams:        #  Stream CRs
  - name: ""
    subjects: []
    # ...optional Stream fields (retention, limits, storage, replicas, placement, mirror/sources, etc.)
    # connection: {}       # optional per-stream overrides

consumers:      #  Consumer CRs
  - streamName: ""
    durableName: ""

keyValues:      # -> KeyValue CRs (buckets)
  - bucket: ""

objectStores:   # -> ObjectStore CRs (buckets)
  - bucket: ""

Example Usage


streams:
  - name: orders
    subjects: ["orders.*"]
    storage: file
    replicas: 1
    maxAge: 72h

consumers:
  - streamName: orders
    durableName: orders-worker
    ackPolicy: explicit
    deliverPolicy: all
    ackWait: 30s

keyValues:
  - bucket: app-kv
    history: 3
    ttl: 24h
    storage: file
    replicas: 1

objectStores:
  - bucket: assets
    ttl: 168h
    storage: file
    replicas: 1

@wpnpeiris wpnpeiris marked this pull request as ready for review October 10, 2025 21:33
@wpnpeiris
Copy link
Author

Hi @wallyqs @samuelattwood
I’ve opened this PR following the proposal in nats-io/nack
This chart has been very useful in our own deployments, and I’d love to contribute it upstream.
It’s ready for review, any feedback on the chart naming, structure, or other improvements would be very welcome.
Thanks!

@wpnpeiris
Copy link
Author

@wallyqs @samuelattwood any feedback here?

enabled: true

# No streams created by default. Uncomment & edit an item below.
streams: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Using lists makes it hard to override things when using multiple value inputs and can easily result in accidental removal of items.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Using lists makes it hard to override things when using multiple value inputs and can easily result in accidental removal of items.

@kejne thanks for the feedback. What is the best alternative here, using a map?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 Something like this (You do limit the name of the stream in this case, but you can also add name as a field within that object). This allows for overriding of specific streams if that is needed.

streams:
  mystream:
    subjects:
      - mysub.>
  myotherstream:
    ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 Something like this (You do limit the name of the stream in this case, but you can also add name as a field within that object). This allows for overriding of specific streams if that is needed.

Thanks @kejne . I got your point. That would be much better.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants