mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-08 02:15:27 +00:00
Move GetHostname() from k/k/pkg/util/node to k/component-helpers/node/util
In fact, this actually uses pkg/util/node's GetHostname() but takes the unit tests from cmd/kubeadm/app/util's private fork of that function since they were more extensive. (Of course the fact that kubeadm had a private fork of this function is a strong argument for moving it to component-helpers.)
This commit is contained in:
@@ -42,7 +42,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/errors"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
volumehelpers "k8s.io/cloud-provider/volume/helpers"
|
||||
"k8s.io/kubernetes/pkg/util/node"
|
||||
nodeutil "k8s.io/component-helpers/node/util"
|
||||
"k8s.io/kubernetes/pkg/volume"
|
||||
volutil "k8s.io/kubernetes/pkg/volume/util"
|
||||
)
|
||||
@@ -327,7 +327,7 @@ func (util *rbdUtil) rbdUnlock(b rbdMounter) error {
|
||||
}
|
||||
|
||||
// Construct lock id using host name and a magic prefix.
|
||||
hostName, err := node.GetHostname("")
|
||||
hostName, err := nodeutil.GetHostname("")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user