Skip to content

Commit

Permalink
Merge pull request #2478 from dims/switch-to-klog-v2
Browse files Browse the repository at this point in the history
Switch to klog v2
  • Loading branch information
dashpole authored Apr 10, 2020
2 parents f72e6ae + 94508e8 commit ca7a117
Show file tree
Hide file tree
Showing 65 changed files with 69 additions and 69 deletions.
2 changes: 1 addition & 1 deletion accelerators/nvidia.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/google/cadvisor/stats"

"github.com/mindprince/gonvml"
"k8s.io/klog"
"k8s.io/klog/v2"
)

type nvidiaManager struct {
Expand Down
2 changes: 1 addition & 1 deletion cache/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/utils"

"k8s.io/klog"
"k8s.io/klog/v2"
)

// ErrDataNotFound is the error resulting if failed to find a container in memory cache.
Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

"github.com/google/cadvisor/info/v1"

"k8s.io/klog"
"k8s.io/klog/v2"
)

// Client represents the base URL for a cAdvisor client.
Expand Down
2 changes: 1 addition & 1 deletion client/clientexample/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/google/cadvisor/client"
info "github.com/google/cadvisor/info/v1"

"k8s.io/klog"
"k8s.io/klog/v2"
)

func staticClientExample() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cadvisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
_ "github.com/google/cadvisor/utils/cloudinfo/azure"
_ "github.com/google/cadvisor/utils/cloudinfo/gce"

"k8s.io/klog"
"k8s.io/klog/v2"
)

var argIp = flag.String("listen_ip", "", "IP to listen on, defaults to all IPs")
Expand Down
2 changes: 2 additions & 0 deletions cmd/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ github.com/go-ini/ini v1.9.0 h1:SVBHBs+26QqWy5m0NyygV8lfVQT/Dq2PeKTiKzcXKAc=
github.com/go-ini/ini v1.9.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8=
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
Expand Down Expand Up @@ -270,5 +271,6 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/klog v0.3.0 h1:0VPpR+sizsiivjIfIAQH/rl8tan6jvWkS7lU+0di3lE=
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog/v2 v2.0.0-rc.1/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU=
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
2 changes: 1 addition & 1 deletion cmd/internal/api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"

"k8s.io/klog"
"k8s.io/klog/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/api/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/google/cadvisor/info/v2"
"github.com/google/cadvisor/manager"

"k8s.io/klog"
"k8s.io/klog/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/container/mesos/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/google/cadvisor/fs"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/watcher"
"k8s.io/klog"
"k8s.io/klog/v2"
)

var MesosAgentAddress = flag.String("mesos_agent", "127.0.0.1:5051", "Mesos agent address")
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/container/mesos/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package install
import (
"github.com/google/cadvisor/cmd/internal/container/mesos"
"github.com/google/cadvisor/container"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/http/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/google/cadvisor/validate"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func RegisterHandlers(mux httpmux.Mux, containerManager manager.Manager, httpAuthFile, httpAuthRealm, httpDigestFile, httpDigestRealm string, urlBasePrefix string) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/pages/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"

"k8s.io/klog"
"k8s.io/klog/v2"
)

const ContainersPage = "/containers/"
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/pages/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/manager"

"k8s.io/klog"
"k8s.io/klog/v2"
)

const DockerPage = "/docker/"
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/pages/pages.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/google/cadvisor/manager"

auth "github.com/abbot/go-http-auth"
"k8s.io/klog"
"k8s.io/klog/v2"
)

var pageTemplate *template.Template
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/pages/static/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"net/url"
"path"

"k8s.io/klog"
"k8s.io/klog/v2"
)

const StaticResource = "/static/"
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/storage/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/google/cadvisor/utils/container"

kafka "github.com/Shopify/sarama"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/storage/statsd/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"net"

"k8s.io/klog"
"k8s.io/klog/v2"
)

type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/storagedriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
_ "github.com/google/cadvisor/cmd/internal/storage/stdout"
"github.com/google/cadvisor/storage"

"k8s.io/klog"
"k8s.io/klog/v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion container/common/fsHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/google/cadvisor/fs"

"k8s.io/klog"
"k8s.io/klog/v2"
)

type FsHandler interface {
Expand Down
2 changes: 1 addition & 1 deletion container/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/pkg/errors"

"k8s.io/klog"
"k8s.io/klog/v2"
)

func DebugInfo(watches map[string][]string) map[string][]string {
Expand Down
2 changes: 1 addition & 1 deletion container/containerd/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"

"golang.org/x/net/context"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/libcontainer"
Expand Down
2 changes: 1 addition & 1 deletion container/containerd/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package install
import (
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/containerd"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion container/crio/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/watcher"

"k8s.io/klog"
"k8s.io/klog/v2"
)

// The namespace under which crio aliases are unique.
Expand Down
2 changes: 1 addition & 1 deletion container/crio/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package install
import (
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/crio"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion container/crio/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/google/cadvisor/fs"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/watcher"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// NewPlugin returns an implementation of container.Plugin suitable for passing to container.RegisterPlugin()
Expand Down
2 changes: 1 addition & 1 deletion container/docker/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (

docker "github.com/docker/docker/client"
"golang.org/x/net/context"
"k8s.io/klog"
"k8s.io/klog/v2"
)

var ArgDockerEndpoint = flag.String("docker", "unix:///var/run/docker.sock", "docker endpoint")
Expand Down
2 changes: 1 addition & 1 deletion container/docker/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs"
libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs"
"golang.org/x/net/context"
"k8s.io/klog"
"k8s.io/klog/v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion container/docker/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package install
import (
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/docker"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion container/docker/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/watcher"
"golang.org/x/net/context"
"k8s.io/klog"
"k8s.io/klog/v2"
)

const dockerClientTimeout = 10 * time.Second
Expand Down
2 changes: 1 addition & 1 deletion container/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/watcher"

"k8s.io/klog"
"k8s.io/klog/v2"
)

type ContainerHandlerFactory interface {
Expand Down
2 changes: 1 addition & 1 deletion container/libcontainer/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (

"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/cgroups"
"k8s.io/klog"
"k8s.io/klog/v2"
)

type Handler struct {
Expand Down
2 changes: 1 addition & 1 deletion container/libcontainer/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/google/cadvisor/container"
"github.com/opencontainers/runc/libcontainer/cgroups"
"k8s.io/klog"
"k8s.io/klog/v2"
)

type CgroupSubsystems struct {
Expand Down
2 changes: 1 addition & 1 deletion container/raw/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
info "github.com/google/cadvisor/info/v1"
watch "github.com/google/cadvisor/watcher"

"k8s.io/klog"
"k8s.io/klog/v2"
)

var dockerOnly = flag.Bool("docker_only", false, "Only report docker containers in addition to root stats")
Expand Down
2 changes: 1 addition & 1 deletion container/raw/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs"
"github.com/opencontainers/runc/libcontainer/configs"
"k8s.io/klog"
"k8s.io/klog/v2"
)

type rawContainerHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion container/raw/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/google/cadvisor/watcher"
inotify "k8s.io/utils/inotify"

"k8s.io/klog"
"k8s.io/klog/v2"
)

type rawContainerWatcher struct {
Expand Down
2 changes: 1 addition & 1 deletion container/systemd/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/watcher"

"k8s.io/klog"
"k8s.io/klog/v2"
)

type systemdFactory struct{}
Expand Down
2 changes: 1 addition & 1 deletion container/systemd/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package install
import (
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/systemd"
"k8s.io/klog"
"k8s.io/klog/v2"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion devicemapper/dmsetup_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strconv"
"strings"

"k8s.io/klog"
"k8s.io/klog/v2"
)

// DmsetupClient is a low-level client for interacting with device mapper via
Expand Down
2 changes: 1 addition & 1 deletion devicemapper/thin_ls_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strconv"
"strings"

"k8s.io/klog"
"k8s.io/klog/v2"
)

// thinLsClient knows how to run a thin_ls very specific to CoW usage for
Expand Down
2 changes: 1 addition & 1 deletion devicemapper/thin_pool_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"sync"
"time"

"k8s.io/klog"
"k8s.io/klog/v2"
)

// ThinPoolWatcher maintains a cache of device name -> usage stats for a
Expand Down
2 changes: 1 addition & 1 deletion events/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils"

"k8s.io/klog"
"k8s.io/klog/v2"
)

type byTimestamp []*info.Event
Expand Down
2 changes: 1 addition & 1 deletion fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/google/cadvisor/utils"
zfs "github.com/mistifyio/go-zfs"

"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/utils/mount"
)

Expand Down
Loading

0 comments on commit ca7a117

Please sign in to comment.