Replace glog with klog

This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-12-05 13:27:55 -03:00
parent f4a4daed84
commit 2fa55eabf6
33 changed files with 353 additions and 327 deletions

View file

@ -21,7 +21,7 @@ import (
"os"
"strings"
"github.com/golang/glog"
"k8s.io/klog"
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clientset "k8s.io/client-go/kubernetes"
@ -42,7 +42,7 @@ func ParseNameNS(input string) (string, string, error) {
func GetNodeIPOrName(kubeClient clientset.Interface, name string, useInternalIP bool) string {
node, err := kubeClient.CoreV1().Nodes().Get(name, metav1.GetOptions{})
if err != nil {
glog.Errorf("Error getting node %v: %v", name, err)
klog.Errorf("Error getting node %v: %v", name, err)
return ""
}
@ -104,7 +104,7 @@ func GetPodDetails(kubeClient clientset.Interface) (*PodInfo, error) {
func MetaNamespaceKey(obj interface{}) string {
key, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj)
if err != nil {
glog.Warning(err)
klog.Warning(err)
}
return key