mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
update the comment of NodeIPs function
This commit is contained in:
parent
322b2fe16f
commit
b199dd8ee1
@ -135,7 +135,7 @@ func (h *netlinkHandle) ListBindAddress(devName string) ([]string, error) {
|
|||||||
// 172.17.0.1 dev docker0 scope host src 172.17.0.1
|
// 172.17.0.1 dev docker0 scope host src 172.17.0.1
|
||||||
// 192.168.122.1 dev virbr0 scope host src 192.168.122.1
|
// 192.168.122.1 dev virbr0 scope host src 192.168.122.1
|
||||||
// Then cut the unique src IP fields,
|
// Then cut the unique src IP fields,
|
||||||
// --> result set: [10.0.0.1, 10.0.0.10, 10.0.0.252, 100.106.89.164, 127.0.0.1, 192.168.122.1]
|
// --> result set: [10.0.0.1, 10.0.0.10, 10.0.0.252, 100.106.89.164, 127.0.0.1, 172.17.0.1, 192.168.122.1]
|
||||||
|
|
||||||
// If dev is specified, it's equivalent to exec:
|
// If dev is specified, it's equivalent to exec:
|
||||||
// $ ip route show table local type local proto kernel dev kube-ipvs0
|
// $ ip route show table local type local proto kernel dev kube-ipvs0
|
||||||
|
@ -283,7 +283,7 @@ type realIPGetter struct {
|
|||||||
// 172.17.0.1 dev docker0 scope host src 172.17.0.1
|
// 172.17.0.1 dev docker0 scope host src 172.17.0.1
|
||||||
// 192.168.122.1 dev virbr0 scope host src 192.168.122.1
|
// 192.168.122.1 dev virbr0 scope host src 192.168.122.1
|
||||||
// Then filter out dev==kube-ipvs0, and cut the unique src IP fields,
|
// Then filter out dev==kube-ipvs0, and cut the unique src IP fields,
|
||||||
// Node IP set: [100.106.89.164, 127.0.0.1, 192.168.122.1]
|
// Node IP set: [100.106.89.164, 127.0.0.1, 172.17.0.1, 192.168.122.1]
|
||||||
func (r *realIPGetter) NodeIPs() (ips []net.IP, err error) {
|
func (r *realIPGetter) NodeIPs() (ips []net.IP, err error) {
|
||||||
// Pass in empty filter device name for list all LOCAL type addresses.
|
// Pass in empty filter device name for list all LOCAL type addresses.
|
||||||
nodeAddress, err := r.nl.GetLocalAddresses("", DefaultDummyDevice)
|
nodeAddress, err := r.nl.GetLocalAddresses("", DefaultDummyDevice)
|
||||||
|
Loading…
Reference in New Issue
Block a user