Skip to main content

Module bootstrap

Module bootstrap 

Source
Expand description

Idempotent JetStream bootstrap (Sprint 6.x follow-up).

Lists every NATS JetStream resource the kanade fleet expects — streams, KV buckets, Object Stores — and asks the broker to create-or-update them. v0.25.0 switched from create_* to create_or_update_*: the old form returned error 10058 (“name already in use with a different configuration”) when a release widened a stream’s subjects or changed its retention policy on a broker that still held the older config. With the new form the broker reconciles its definition to the one in this file, so version bumps no longer require operator-side data wipes.

Centralising the list here means a future “we added a new bucket” change touches one place and both the operator CLI + the auto-bootstrap path pick it up.

Functions§

ensure_jetstream_resources
Idempotently create every NATS JetStream resource the kanade fleet relies on. Calling repeatedly is safe — create_* returns the existing resource if it’s already configured.