Skip to content

Commit

Permalink
Merge pull request #975 from mrueg/conv-fix
Browse files Browse the repository at this point in the history
Fix unnecessary conversions
  • Loading branch information
aauren authored Aug 21, 2020
2 parents b7610a0 + 4d1fc8d commit c6ef3b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/proxy/network_services_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}()

Expand Down
2 changes: 1 addition & 1 deletion pkg/healthcheck/health_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c6ef3b8

Please sign in to comment.