feat(zfspv): move to klog (#166)

Signed-off-by: vaniisgh <vanisingh@live.co.uk>
This commit is contained in:
vaniisgh 2020-06-29 12:18:33 +05:30 committed by GitHub
parent 54f2b0b9fd
commit d0d1664d43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 124 additions and 2991 deletions

View file

@ -19,7 +19,6 @@ package snapshot
import (
"sync"
"github.com/Sirupsen/logrus"
"github.com/pkg/errors"
"time"
@ -30,6 +29,7 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"
)
var (
@ -94,7 +94,7 @@ func Start(controllerMtx *sync.RWMutex, stopCh <-chan struct{}) error {
func getClusterConfig(kubeconfig string) (*rest.Config, error) {
cfg, err := rest.InClusterConfig()
if err != nil {
logrus.Errorf("Failed to get k8s Incluster config. %+v", err)
klog.Errorf("Failed to get k8s Incluster config. %+v", err)
if kubeconfig == "" {
return nil, errors.Wrap(err, "kubeconfig is empty")
}