Commit ea456bb3 authored by WanLinghao's avatar WanLinghao

Clean unused function in pkg/kubelet/kublet.go

parent b18660eb
...@@ -1221,29 +1221,6 @@ type Kubelet struct { ...@@ -1221,29 +1221,6 @@ type Kubelet struct {
runtimeClassManager *runtimeclass.Manager runtimeClassManager *runtimeclass.Manager
} }
func allGlobalUnicastIPs() ([]net.IP, error) {
interfaces, err := net.Interfaces()
if err != nil {
return nil, fmt.Errorf("could not list network interfaces: %v", err)
}
var ips []net.IP
for _, i := range interfaces {
addresses, err := i.Addrs()
if err != nil {
return nil, fmt.Errorf("could not list the addresses for network interface %v: %v", i, err)
}
for _, address := range addresses {
switch v := address.(type) {
case *net.IPNet:
if v.IP.IsGlobalUnicast() {
ips = append(ips, v.IP)
}
}
}
}
return ips, nil
}
// setupDataDirs creates: // setupDataDirs creates:
// 1. the root directory // 1. the root directory
// 2. the pods directory // 2. the pods directory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment