Skip to content

Commit

Permalink
Merge pull request google#1817 from dashpole/util_clock
Browse files Browse the repository at this point in the history
Switch from apimachinery clock to k8s.io/utils/clock
  • Loading branch information
dashpole authored Nov 22, 2017
2 parents 5831d72 + 3166cda commit e420065
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 126 deletions.
9 changes: 6 additions & 3 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions manager/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ import (

units "github.com/docker/go-units"
"github.com/golang/glog"

"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/utils/clock"
)

// Housekeeping interval.
Expand Down
3 changes: 1 addition & 2 deletions manager/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ import (
"github.com/mindprince/gonvml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"k8s.io/apimachinery/pkg/util/clock"
clock "k8s.io/utils/clock/testing"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import (

"github.com/golang/glog"
"github.com/opencontainers/runc/libcontainer/cgroups"
"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/utils/clock"
)

var globalHousekeepingInterval = flag.Duration("global_housekeeping_interval", 1*time.Minute, "Interval between global housekeepings")
Expand Down
3 changes: 2 additions & 1 deletion manager/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ import (
itest "github.com/google/cadvisor/info/v1/test"
"github.com/google/cadvisor/info/v2"
"github.com/google/cadvisor/utils/sysfs/fakesysfs"

"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/util/clock"
clock "k8s.io/utils/clock/testing"
)

// TODO(vmarmol): Refactor these tests.
Expand Down
33 changes: 0 additions & 33 deletions vendor/k8s.io/apimachinery/pkg/util/clock/BUILD

This file was deleted.

File renamed without changes.
94 changes: 94 additions & 0 deletions vendor/k8s.io/utils/clock/clock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e420065

Please sign in to comment.