With the refactoring in #2713 I removed one important part of syncing the streams: Fetching the current state from K8s API. Instead I looped over the new cluster struct field Streams which is always empty on start up. This will produce a new stream resource on ever operator pod start. Therefore, I added a delete logic to cleanup the ill-created duplicates.
The unit tests were extended to test syncing and removal as well as owner references update.
With the refactoring in #2713 I removed one important part of syncing the streams: Fetching the current state from K8s API. Instead I looped over the new cluster struct field Streams which is always empty on start up. This will produce a new stream resource on ever operator pod start. Therefore, I added a delete logic to cleanup the ill-created duplicates.
The unit tests were extended to test syncing and removal as well as owner references update.