mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Update portworx to move from glog to klog
Signed-off-by: Harsh Desai <harsh@portworx.com>
This commit is contained in:
parent
db93c5fcbe
commit
fdc60629c9
@ -295,10 +295,10 @@ func (util *portworxVolumeUtil) getPortworxDriver(volumeHost volume.VolumeHost)
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.Infof("Using portworx cluster service at: %v:%d as api endpoint",
|
klog.Infof("Using portworx cluster service at: %v:%d as api endpoint",
|
||||||
svc.Spec.ClusterIP, osdMgmtDefaultPort)
|
svc.Spec.ClusterIP, osdMgmtDefaultPort)
|
||||||
} else {
|
} else {
|
||||||
glog.Infof("Using portworx service at: %v:%d as api endpoint",
|
klog.Infof("Using portworx service at: %v:%d as api endpoint",
|
||||||
volumeHost.GetHostName(), osdMgmtDefaultPort)
|
volumeHost.GetHostName(), osdMgmtDefaultPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,7 +330,7 @@ func (util *portworxVolumeUtil) getLocalPortworxDriver(volumeHost volume.VolumeH
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.Infof("Using portworx local service at: %v:%d as api endpoint",
|
klog.Infof("Using portworx local service at: %v:%d as api endpoint",
|
||||||
volumeHost.GetHostName(), osgMgmtPort)
|
volumeHost.GetHostName(), osgMgmtPort)
|
||||||
return volumeclient.VolumeDriver(util.portworxClient), nil
|
return volumeclient.VolumeDriver(util.portworxClient), nil
|
||||||
}
|
}
|
||||||
@ -351,20 +351,20 @@ func getPortworxService(host volume.VolumeHost) (*v1.Service, error) {
|
|||||||
kubeClient := host.GetKubeClient()
|
kubeClient := host.GetKubeClient()
|
||||||
if kubeClient == nil {
|
if kubeClient == nil {
|
||||||
err := fmt.Errorf("Failed to get kubeclient when creating portworx client")
|
err := fmt.Errorf("Failed to get kubeclient when creating portworx client")
|
||||||
glog.Errorf(err.Error())
|
klog.Errorf(err.Error())
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
opts := metav1.GetOptions{}
|
opts := metav1.GetOptions{}
|
||||||
svc, err := kubeClient.CoreV1().Services(api.NamespaceSystem).Get(pxServiceName, opts)
|
svc, err := kubeClient.CoreV1().Services(api.NamespaceSystem).Get(pxServiceName, opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Failed to get service. Err: %v", err)
|
klog.Errorf("Failed to get service. Err: %v", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if svc == nil {
|
if svc == nil {
|
||||||
err = fmt.Errorf("Service: %v not found. Consult Portworx docs to deploy it.", pxServiceName)
|
err = fmt.Errorf("Service: %v not found. Consult Portworx docs to deploy it.", pxServiceName)
|
||||||
glog.Errorf(err.Error())
|
klog.Errorf(err.Error())
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user