Merge pull request #12273 from hakman/break_for_non-placeholder_ip

Fix bootstrap when at least one IP is available
This commit is contained in:
Kubernetes Prow Robot 2021-09-05 02:47:27 -07:00 committed by GitHub
commit 543e9c40e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 8 deletions

View File

@ -166,14 +166,8 @@ func (b *KopsBootstrapClient) QueryBootstrap(ctx context.Context, req *nodeup.Bo
return nil, fi.NewTryAgainLaterError(fmt.Sprintf("kops-controller DNS not setup yet (not found: %v)", dnsErr))
}
return nil, err
} else {
for _, ip := range ips {
if ip.String() != cloudup.PlaceholderIP {
break
} else {
return nil, fi.NewTryAgainLaterError(fmt.Sprintf("kops-controller DNS not setup yet (placeholder IP found: %v)", ips))
}
}
} else if len(ips) == 1 && ips[0].String() == cloudup.PlaceholderIP {
return nil, fi.NewTryAgainLaterError(fmt.Sprintf("kops-controller DNS not setup yet (placeholder IP found: %v)", ips))
}
reqBytes, err := json.Marshal(req)