Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog - klog as explicit InitFlags() so we add them as necessary - we update the other repositories that we vendor that made a similar change from glog to klog * github.com/kubernetes/repo-infra * k8s.io/gengo/ * k8s.io/kube-openapi/ * github.com/google/cadvisor - Entirely remove all references to glog - Fix some tests by explicit InitFlags in their init() methods Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
This commit is contained in:
@@ -24,12 +24,12 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/kardianos/osext"
|
||||
"github.com/xanzy/go-cloudstack/cloudstack"
|
||||
"gopkg.in/gcfg.v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
cloudprovider "k8s.io/cloud-provider"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
// ProviderName is the name of this cloud provider.
|
||||
@@ -98,10 +98,10 @@ func newCSCloud(cfg *CSConfig) (*CSCloud, error) {
|
||||
// In CloudStack your metadata is always served by the DHCP server.
|
||||
dhcpServer, err := findDHCPServer()
|
||||
if err == nil {
|
||||
glog.V(4).Infof("Found metadata server: %v", dhcpServer)
|
||||
klog.V(4).Infof("Found metadata server: %v", dhcpServer)
|
||||
cs.metadata = &metadata{dhcpServer: dhcpServer, zone: cs.zone}
|
||||
} else {
|
||||
glog.Errorf("Error searching metadata server: %v", err)
|
||||
klog.Errorf("Error searching metadata server: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ func newCSCloud(cfg *CSConfig) (*CSCloud, error) {
|
||||
|
||||
if cs.client == nil {
|
||||
if cs.metadata != nil {
|
||||
glog.V(2).Infof("No API URL, key and secret are provided, so only using metadata!")
|
||||
klog.V(2).Infof("No API URL, key and secret are provided, so only using metadata!")
|
||||
} else {
|
||||
return nil, errors.New("no cloud provider config given")
|
||||
}
|
||||
@@ -208,7 +208,7 @@ func (cs *CSCloud) GetZone(ctx context.Context) (cloudprovider.Zone, error) {
|
||||
cs.zone = instance.Zonename
|
||||
}
|
||||
|
||||
glog.V(2).Infof("Current zone is %v", cs.zone)
|
||||
klog.V(2).Infof("Current zone is %v", cs.zone)
|
||||
zone.FailureDomain = cs.zone
|
||||
zone.Region = cs.zone
|
||||
|
||||
@@ -230,7 +230,7 @@ func (cs *CSCloud) GetZoneByProviderID(ctx context.Context, providerID string) (
|
||||
return zone, fmt.Errorf("error retrieving zone: %v", err)
|
||||
}
|
||||
|
||||
glog.V(2).Infof("Current zone is %v", cs.zone)
|
||||
klog.V(2).Infof("Current zone is %v", cs.zone)
|
||||
zone.FailureDomain = instance.Zonename
|
||||
zone.Region = instance.Zonename
|
||||
|
||||
@@ -252,7 +252,7 @@ func (cs *CSCloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeNam
|
||||
return zone, fmt.Errorf("error retrieving zone: %v", err)
|
||||
}
|
||||
|
||||
glog.V(2).Infof("Current zone is %v", cs.zone)
|
||||
klog.V(2).Infof("Current zone is %v", cs.zone)
|
||||
zone.FailureDomain = instance.Zonename
|
||||
zone.Region = instance.Zonename
|
||||
|
||||
|
Reference in New Issue
Block a user