File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package iface
19
19
import (
20
20
"fmt"
21
21
"net"
22
+ "strings"
22
23
23
24
"github.com/sirupsen/logrus"
24
25
)
@@ -64,8 +65,21 @@ func FirstPublicAddress() (string, error) {
64
65
}
65
66
ipv6addr := ""
66
67
for _ , i := range ifs {
67
- if i .Name == "vxlan.calico" || i .Name == "kube-bridge" {
68
- // Skip calico and kube-router interfaces
68
+ switch {
69
+ // Skip calico CNI interface
70
+ case i .Name == "vxlan.calico" :
71
+ continue
72
+ // Skip kube-router CNI interface
73
+ case i .Name == "kube-bridge" :
74
+ continue
75
+ // Skip k0s CPLB interface
76
+ case i .Name == "dummyvip0" :
77
+ continue
78
+ // Skip kube-router pod CNI interfaces
79
+ case strings .HasPrefix (i .Name , "veth" ):
80
+ continue
81
+ // Skip calico pod CNI interfaces
82
+ case strings .HasPrefix (i .Name , "cali" ):
69
83
continue
70
84
}
71
85
addresses , err := i .Addrs ()
You can’t perform that action at this time.
0 commit comments