diff --git a/pkg/monitor/monitor/monitor_manager.go b/pkg/monitor/monitor/monitor_manager.go index 23aa61a04b..2e58ea47fa 100644 --- a/pkg/monitor/monitor/monitor_manager.go +++ b/pkg/monitor/monitor/monitor_manager.go @@ -147,6 +147,10 @@ func (mm *MonitorManager) syncTidbMonitorDeployment(monitor *v1alpha1.TidbMonito } targetTcRef := monitor.Spec.Clusters[0] + if len(targetTcRef.Namespace) < 1 { + targetTcRef.Namespace = monitor.Namespace + } + tc, err := mm.tcLister.TidbClusters(targetTcRef.Namespace).Get(targetTcRef.Name) if err != nil { return err