Feature request: Add support for Jetstream domain
TarasLykhenko opened this issue · comments
What motivated this proposal?
I am trying to implement Jetstream with leaf nodes following a spoke/hub architecture, but NACK currently does not support specifying the Jetstream domain in which the stream should be created. https://github.com/nats-io/jetstream-leaf-nodes-demo/tree/main
What is the proposed change?
I am proposing to add a new field to the Stream and Consumer called jsDomain
that overwrites the default jetstream domain.
apiVersion: jetstream.nats.io/v1beta2
kind: Stream
metadata:
name: mystream
spec:
name: mystream
subjects: ["orders.*"]
jsDomain: "spoke-1"
storage: memory
maxAge: 1h
Moreover, to add the ability to set the default jsDomain that is used when no domain is specified in the CR.
Who benefits from this change?
No response
What alternatives have you evaluated?
No response
I think I need this too.
https://github.com/ServiceWeaver/weaver allows direct CRD control and I embed NATS leaves.
Weaver runs on GCP, EKS, k8 on premise and bare metal without any docker.
cc @bruth
We will look into this.
As domain is part of the jetstream context, not consumer or stream api calls, it might need some small refactor.