From ac45393a47f34edce0e37fbbac499fa64b067e26 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Mon, 17 Dec 2018 11:54:32 -0800 Subject: [PATCH] Update cri-tools to v1.13.0. Signed-off-by: Lantao Liu --- cri.go | 11 +++++++---- hack/utils.sh | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cri.go b/cri.go index c06b050e6..f8b30574a 100644 --- a/cri.go +++ b/cri.go @@ -36,6 +36,7 @@ import ( imagespec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/sirupsen/logrus" + "k8s.io/klog" criconfig "github.com/containerd/cri/pkg/config" "github.com/containerd/cri/pkg/constants" @@ -175,16 +176,18 @@ func getServicesOpts(ic *plugin.InitContext) ([]containerd.ServicesOpt, error) { // Set glog level. func setGLogLevel() error { l := logrus.GetLevel() - if err := flag.Set("logtostderr", "true"); err != nil { + fs := flag.NewFlagSet("klog", flag.PanicOnError) + klog.InitFlags(fs) + if err := fs.Set("logtostderr", "true"); err != nil { return err } switch l { case log.TraceLevel: - return flag.Set("v", "5") + return fs.Set("v", "5") case logrus.DebugLevel: - return flag.Set("v", "4") + return fs.Set("v", "4") case logrus.InfoLevel: - return flag.Set("v", "2") + return fs.Set("v", "2") // glog doesn't support following filters. Defaults to v=0. case logrus.WarnLevel: case logrus.ErrorLevel: diff --git a/hack/utils.sh b/hack/utils.sh index 5ff6a4766..edb545b3b 100755 --- a/hack/utils.sh +++ b/hack/utils.sh @@ -17,7 +17,7 @@ ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. # Not from vendor.conf. -CRITOOL_VERSION=v1.12.0 +CRITOOL_VERSION=v1.13.0 CRITOOL_PKG=github.com/kubernetes-sigs/cri-tools CRITOOL_REPO=github.com/kubernetes-sigs/cri-tools