Skip to content

Commit 434a17b

Browse files
committed
need to update c.Stream when there is no update
1 parent 6dd01fa commit 434a17b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/cluster/streams.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,16 +505,17 @@ func (c *Cluster) syncStream(appId string) error {
505505
continue
506506
}
507507
streamExists = true
508+
c.Streams[appId] = &stream
508509
desiredStreams := c.generateFabricEventStream(appId)
509510
if !reflect.DeepEqual(stream.ObjectMeta.OwnerReferences, desiredStreams.ObjectMeta.OwnerReferences) {
510511
c.logger.Infof("owner references of event streams with applicationId %s do not match the current ones", appId)
511512
stream.ObjectMeta.OwnerReferences = desiredStreams.ObjectMeta.OwnerReferences
512513
c.setProcessName("updating event streams with applicationId %s", appId)
513-
stream, err := c.KubeClient.FabricEventStreams(stream.Namespace).Update(context.TODO(), &stream, metav1.UpdateOptions{})
514+
updatedStream, err := c.KubeClient.FabricEventStreams(stream.Namespace).Update(context.TODO(), &stream, metav1.UpdateOptions{})
514515
if err != nil {
515516
return fmt.Errorf("could not update event streams with applicationId %s: %v", appId, err)
516517
}
517-
c.Streams[appId] = stream
518+
c.Streams[appId] = updatedStream
518519
}
519520
if match, reason := c.compareStreams(&stream, desiredStreams); !match {
520521
c.logger.Infof("updating event streams with applicationId %s: %s", appId, reason)

0 commit comments

Comments
 (0)