remove GetHostName func from the VolumeHost interface

Signed-off-by: carlory <baofa.fan@daocloud.io>
This commit is contained in:
carlory 2025-11-13 10:57:59 +08:00
parent 299ec97e6f
commit 6d1afce678
7 changed files with 0 additions and 28 deletions

View file

@ -822,10 +822,6 @@ func (adc *attachDetachController) GetMounter() mount.Interface {
return nil
}
func (adc *attachDetachController) GetHostName() string {
return ""
}
func (adc *attachDetachController) GetNodeAllocatable() (v1.ResourceList, error) {
return v1.ResourceList{}, nil
}

View file

@ -417,10 +417,6 @@ func (expc *expandController) GetMounter() mount.Interface {
return nil
}
func (expc *expandController) GetHostName() string {
return ""
}
func (expc *expandController) GetNodeAllocatable() (v1.ResourceList, error) {
return v1.ResourceList{}, nil
}

View file

@ -75,10 +75,6 @@ func (ctrl *PersistentVolumeController) GetMounter() mount.Interface {
return nil
}
func (ctrl *PersistentVolumeController) GetHostName() string {
return ""
}
func (ctrl *PersistentVolumeController) GetNodeAllocatable() (v1.ResourceList, error) {
return v1.ResourceList{}, nil
}

View file

@ -75,10 +75,6 @@ func (c *Controller) GetMounter() mount.Interface {
return nil
}
func (c *Controller) GetHostName() string {
return ""
}
func (c *Controller) GetNodeAllocatable() (v1.ResourceList, error) {
return v1.ResourceList{}, nil
}

View file

@ -219,10 +219,6 @@ func (kvh *kubeletVolumeHost) GetMounter() mount.Interface {
return kvh.kubelet.mounter
}
func (kvh *kubeletVolumeHost) GetHostName() string {
return kvh.kubelet.hostname
}
func (kvh *kubeletVolumeHost) GetNodeAllocatable() (v1.ResourceList, error) {
node, err := kvh.kubelet.getNodeAnyWay()
if err != nil {

View file

@ -390,9 +390,6 @@ type VolumeHost interface {
// Get mounter interface.
GetMounter() mount.Interface
// Returns the hostname of the host kubelet is running on
GetHostName() string
// Returns node allocatable.
GetNodeAllocatable() (v1.ResourceList, error)

View file

@ -173,11 +173,6 @@ func (f *fakeVolumeHost) NewWrapperUnmounter(volName string, spec Spec, podUID t
return plug.NewUnmounter(spec.Name(), podUID)
}
// Returns the hostname of the host kubelet is running on
func (f *fakeVolumeHost) GetHostName() string {
return "fakeHostName"
}
func (f *fakeVolumeHost) GetNodeAllocatable() (v1.ResourceList, error) {
return v1.ResourceList{}, nil
}