Merge pull request #2041 from qyz87/qyz87-addnodes-kubevip

fix: redundant interface for kubevip when add k8s nodes
This commit is contained in:
KubeSphere CI Bot 2023-11-14 09:54:27 +08:00 committed by GitHub
commit a9df358ade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,6 +165,7 @@ func (g *GetInterfaceName) Execute(runtime connector.Runtime) error {
}
cmd := fmt.Sprintf("ip route "+
"| grep ' %s ' "+
"| grep 'proto kernel scope link src'"+
"| sed -e \"s/^.*dev.//\" -e \"s/.proto.*//\""+
"| uniq ", host.GetAddress())
interfaceName, err := runtime.GetRunner().SudoCmd(cmd, false)