mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
bring back minor DNS cache for k8s setups (#19341)
k8s as it stands is flaky in DNS lookups, bring this change back such that we can cache DNS atleast for 30secs TTL.
This commit is contained in:
@@ -98,12 +98,7 @@ func mustGetLocalIP6() (ipList set.StringSet) {
|
||||
|
||||
// getHostIP returns IP address of given host.
|
||||
func getHostIP(host string) (ipList set.StringSet, err error) {
|
||||
lookupHost := globalDNSCache.LookupHost
|
||||
if IsKubernetes() || IsDocker() {
|
||||
lookupHost = net.DefaultResolver.LookupHost
|
||||
}
|
||||
|
||||
addrs, err := lookupHost(GlobalContext, host)
|
||||
addrs, err := globalDNSCache.LookupHost(GlobalContext, host)
|
||||
if err != nil {
|
||||
return ipList, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user