apache / rocketmq-operator

Apache RocketMQ Operator
https://rocketmq.apache.org/
Apache License 2.0
310 stars 126 forks source link

The stateful variables in share.go #123

Closed gobbq closed 1 year ago

gobbq commented 1 year ago

BUG REPORT

The NameServersStr variable in share.go will be empty if we restart or recreate the operator pods, logs as follows: image

SUGGESTION

The operator uses share.go to store the state of name service, such as endpoints, initialized and so on. This leads to the presence of states in operator, for most cases we only want the operator to do some sure actions when reconciled and not rely on the state in memory, for example, creating broker resources if nameservice.status.initialized=true.

For the further version, we'd better to remove the share.go in the operator.