Skip to content

Commit

Permalink
analyzer: do not depend on local network (#50534)
Browse files Browse the repository at this point in the history
Co-authored-by: John Howard <john.howard@solo.io>
  • Loading branch information
istio-testing and howardjohn committed Apr 18, 2024
1 parent b60dffb commit ed90e14
Showing 1 changed file with 0 additions and 10 deletions.
Expand Up @@ -108,8 +108,6 @@ func (s *ExternalControlPlaneAnalyzer) Analyze(c analysis.Context) {
type webhookURLResult struct {
ip net.IP
hostName string

resolvesIPs []net.IP
}

func (r *webhookURLResult) isIP() bool {
Expand All @@ -133,14 +131,6 @@ func lintWebhookURL(webhookURL string) (result *webhookURLResult, err error) {
}

result.hostName = parsedHostname
ips, err := net.LookupIP(parsedHostname)
if err != nil {
return result, fmt.Errorf("cannot be resolved via a DNS lookup")
}
result.resolvesIPs = ips
if len(ips) == 0 {
return result, fmt.Errorf("resolves with zero IP addresses")
}

return result, nil
}

0 comments on commit ed90e14

Please sign in to comment.