mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
cleanup: standardize error format in util.k8sGetNodeLabels()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
752841d213
commit
6d5de7458d
@ -35,7 +35,7 @@ func k8sGetNodeLabels(nodeName string) (map[string]string, error) {
|
|||||||
client := NewK8sClient()
|
client := NewK8sClient()
|
||||||
node, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{})
|
node, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to get node (%s) information : %v", nodeName, err)
|
return nil, fmt.Errorf("failed to get node %q information: %w", nodeName, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return node.GetLabels(), nil
|
return node.GetLabels(), nil
|
||||||
|
Loading…
Reference in New Issue
Block a user