Skip to content

Commit c11fec7

Browse files
peerless1024evelynwei
and
evelynwei
authored
fix: grpc conn should not open when config sync is disabled (#195)
Co-authored-by: evelynwei <[email protected]>
1 parent 58afa53 commit c11fec7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/controller/configmap.go

+4
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ func (p *PolarisController) onConfigMapDelete(cur interface{}) {
282282
}
283283

284284
func (p *PolarisController) watchPolarisConfig() error {
285+
log.SyncConfigScope().Infof("configSync status:%v", p.config.PolarisController.ConfigSync.Enable)
286+
if !p.config.PolarisController.ConfigSync.Enable {
287+
return nil
288+
}
285289
conn, err := grpc.Dial(polarisapi.PolarisConfigGrpc, grpc.WithTransportCredentials(insecure.NewCredentials()))
286290
if err != nil {
287291
return err

0 commit comments

Comments
 (0)