@@ -786,11 +786,11 @@ func InitializeMultiTenantController(ctx context.Context, httpRestService cns.HT
786786 logger .Printf ("Starting SyncHostNCVersion" )
787787 go func () {
788788 // Periodically poll vfp programmed NC version from NMAgent
789- tickerChannel := time .Tick (cnsconfig .SyncHostNCVersionIntervalMs )
789+ tickerChannel := time .Tick (time . Duration ( cnsconfig .SyncHostNCVersionIntervalMs ) * time . Millisecond )
790790 for {
791791 select {
792792 case <- tickerChannel :
793- timedCtx , cancel := context .WithTimeout (ctx , cnsconfig .SyncHostNCTimeoutMs )
793+ timedCtx , cancel := context .WithTimeout (ctx , time . Duration ( cnsconfig .SyncHostNCVersionIntervalMs ) * time . Millisecond )
794794 httpRestServiceImpl .SyncHostNCVersion (timedCtx , cnsconfig .ChannelMode )
795795 cancel ()
796796 case <- ctx .Done ():
@@ -895,7 +895,10 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
895895 scopedcli := kubecontroller .NewScopedClient (nnccli , types.NamespacedName {Namespace : "kube-system" , Name : nodeName })
896896
897897 // initialize the ipam pool monitor
898- poolMonitor := ipampool .NewMonitor (httpRestServiceImplementation , scopedcli , & ipampool.Options {RefreshDelay : poolIPAMRefreshRateInMilliseconds })
898+ poolOpts := ipampool.Options {
899+ RefreshDelay : poolIPAMRefreshRateInMilliseconds * time .Millisecond ,
900+ }
901+ poolMonitor := ipampool .NewMonitor (httpRestServiceImplementation , scopedcli , & poolOpts )
899902 httpRestServiceImplementation .IPAMPoolMonitor = poolMonitor
900903 logger .Printf ("Starting IPAM Pool Monitor" )
901904 go func () {
@@ -951,11 +954,11 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
951954 logger .Printf ("Starting SyncHostNCVersion" )
952955 go func () {
953956 // Periodically poll vfp programmed NC version from NMAgent
954- tickerChannel := time .Tick (cnsconfig .SyncHostNCVersionIntervalMs )
957+ tickerChannel := time .Tick (time . Duration ( cnsconfig .SyncHostNCVersionIntervalMs ) * time . Millisecond )
955958 for {
956959 select {
957960 case <- tickerChannel :
958- timedCtx , cancel := context .WithTimeout (ctx , cnsconfig .SyncHostNCTimeoutMs )
961+ timedCtx , cancel := context .WithTimeout (ctx , time . Duration ( cnsconfig .SyncHostNCVersionIntervalMs ) * time . Millisecond )
959962 httpRestServiceImplementation .SyncHostNCVersion (timedCtx , cnsconfig .ChannelMode )
960963 cancel ()
961964 case <- ctx .Done ():
0 commit comments