Closed himao closed 1 year ago
@himao What's the operator image you previously used?
@caigy The image used by the operator originally deployed in the prod namespace is apacherocketmq/rocketmq-operator:0.3.0-snapshot. Now the image used by the operator deployed in the gray namespace is apache/rocketmq-operator:0.3.0. Other information to note:
@himao By default, operator-sdk
generates a cluster-scoped operator(https://sdk.operatorframework.io/docs/building-operators/golang/operator-scope/). So the operator can watch CRDs in all namespace. I'll check whether this operator was namespace-scoped in previous versions.
Environment variable WATCH_NAMESPACE does not take effect.
BUG REPORT
What did you do (The steps to reproduce)? An operator has been deployed in the prod namespace of the cluster, which is a version before 0.3.0-rc1 and has been running stably for several months. Now, I deploy version 0.3.0 in the gray namespace of the same cluster, following the deployment materials in the deploy directory.
What did you expect to see? Because rocketmq crd is not created in namespace gray, the operator log deployed in namespace gray should be relatively clean.
What did you see instead? In fact, newly deployed operators in the gray namespace print logs showing resources in the operator prod namespace. WATCH_NAMESPACE isolation doesn't seem to take effect.
Please tell us about your environment: Kubernetes 1.20
Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc): operator log in gray namespace:
2022-10-25T06:04:28.238Z INFO controller_nameservice Share variables {"Request.Namespace": "prod", "Request.Name": "name-service", "GroupNum": 1, "NameServersStr": "172.16.0.18:9876;", "IsNameServersStrUpdated": false, "IsNameServersStrInitialized": true, "BrokerClusterName": "broker"} 2022-10-25T06:04:29.222Z INFO controller_broker Reconciling Broker. {"Request.Namespace": "prod", "Request.Name": "broker"} 2022-10-25T06:04:29.222Z INFO controller_broker brokerGroupNum=1, replicaPerGroup=1 {"Request.Namespace": "prod", "Request.Name": "broker"} 2022-10-25T06:04:29.222Z INFO controller_broker Check Broker cluster 1/1 {"Request.Namespace": "prod", "Request.Name": "broker"} 2022-10-25T06:04:29.222Z INFO controller_broker Check Replica Broker of cluster-0 1/1 {"Request.Namespace": "prod", "Request.Name": "broker"} 2022-10-25T06:04:29.222Z INFO controller_broker broker.Status.Nodes length = 2