From 8244807d135a3f182b6cdee649194f793622a3fd Mon Sep 17 00:00:00 2001 From: Piotr Piotrowski Date: Wed, 20 Mar 2024 11:38:06 +0100 Subject: [PATCH] Fix setting placement on stream update (#171) Signed-off-by: Piotr Piotrowski --- controllers/jetstream/stream.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controllers/jetstream/stream.go b/controllers/jetstream/stream.go index f87277c8..5c5844cb 100644 --- a/controllers/jetstream/stream.go +++ b/controllers/jetstream/stream.go @@ -514,6 +514,13 @@ func updateStream(ctx context.Context, c jsmClient, spec apis.StreamSpec) (err e config.Sources[i] = jss } + if spec.Placement != nil { + config.Placement = &jsmapi.Placement{ + Cluster: spec.Placement.Cluster, + Tags: spec.Placement.Tags, + } + } + if spec.Metadata != nil { config.Metadata = spec.Metadata }