The NameServersStr variable in share.go will be empty if we restart or recreate the operator pods, logs as follows:
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.
BUG REPORT
The![image](https://user-images.githubusercontent.com/9428795/182555803-ac8119cc-07f5-43e9-a96d-590d4177eebd.png)
NameServersStr
variable inshare.go
will be empty if we restart or recreate the operator pods, logs as follows: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.