Skip to content

Commit

Permalink
fix: grpc conn should not open when config sync is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
evelynwei committed Dec 11, 2024
1 parent 58afa53 commit ebf4fea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ func (p *PolarisController) onConfigMapDelete(cur interface{}) {
}

func (p *PolarisController) watchPolarisConfig() error {
log.SyncConfigScope().Infof("configSync status:%v", p.config.PolarisController.ConfigSync.Enable)
if !p.config.PolarisController.ConfigSync.Enable {
return nil
}
conn, err := grpc.Dial(polarisapi.PolarisConfigGrpc, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return err
Expand Down

0 comments on commit ebf4fea

Please sign in to comment.