diff --git a/pkg/controllers/proxy/network_services_controller.go b/pkg/controllers/proxy/network_services_controller.go index f31fff5fbf..6f87d76fc9 100644 --- a/pkg/controllers/proxy/network_services_controller.go +++ b/pkg/controllers/proxy/network_services_controller.go @@ -722,7 +722,7 @@ func (nsc *NetworkServicesController) publishMetrics(serviceInfoMap serviceInfoM endTime := time.Since(start) glog.V(2).Infof("Publishing IPVS metrics took %v", endTime) if nsc.MetricsEnabled { - metrics.ControllerIpvsMetricsExportTime.Observe(float64(endTime.Seconds())) + metrics.ControllerIpvsMetricsExportTime.Observe(endTime.Seconds()) } }() diff --git a/pkg/healthcheck/health_controller.go b/pkg/healthcheck/health_controller.go index 1d679e9e4a..89d819203c 100644 --- a/pkg/healthcheck/health_controller.go +++ b/pkg/healthcheck/health_controller.go @@ -110,7 +110,7 @@ func (hc *HealthController) HandleHeartbeat(beat *ControllerHeartbeat) { // CheckHealth evaluates the time since last heartbeat to decide if the controller is running or not func (hc *HealthController) CheckHealth() bool { health := true - graceTime := time.Duration(1500 * time.Millisecond) + graceTime := time.Duration(1500) * time.Millisecond if hc.Config.RunFirewall { if time.Since(hc.Status.NetworkPolicyControllerAlive) > hc.Config.IPTablesSyncPeriod+hc.Status.NetworkPolicyControllerAliveTTL+graceTime {