mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-03 20:59:52 +00:00
Fix FetchIngressIP error checking
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
c61b8c077a
commit
9f3a64fcd8
@@ -348,12 +348,11 @@ func FetchIngressIP(kubeconfig string) ([]string, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ingressIP := strings.Trim(res, " ")
|
||||
ingressIPs := strings.Split(ingressIP, " ")
|
||||
if len(ingressIPs) == 0 {
|
||||
return nil, errors.New("no ingress IP found")
|
||||
res = strings.TrimSpace(res)
|
||||
if res == "" {
|
||||
return nil, errors.New("no ingress IPs found")
|
||||
}
|
||||
return ingressIPs, nil
|
||||
return strings.Split(res, " "), nil
|
||||
}
|
||||
|
||||
func (v VagrantNode) FetchNodeExternalIP() (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user