Skip to content

Commit 8fe8b96

Browse files
authored
Merge pull request #2165 from aojea/ahosts
don't use loopback addresses on the nodes resolv.conf file
2 parents 83b25fd + 3f0d1f7 commit 8fe8b96

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

images/base/files/usr/local/bin/entrypoint

+2-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ enable_network_magic(){
337337
# first we need to detect an IP to use for reaching the docker host
338338
local docker_host_ip
339339
docker_host_ip="$( (getent ahostsv4 'host.docker.internal' | head -n1 | cut -d' ' -f1) || true)"
340-
if [[ -z "${docker_host_ip}" ]]; then
340+
# if the ip doesn't exist or is a loopback address use the default gateway
341+
if [[ -z "${docker_host_ip}" ]] || [[ $docker_host_ip =~ ^127\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
341342
docker_host_ip=$(ip -4 route show default | cut -d' ' -f3)
342343
fi
343344

pkg/build/nodeimage/defaults.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ package nodeimage
2020
const DefaultImage = "kindest/node:latest"
2121

2222
// DefaultBaseImage is the default base image used
23-
const DefaultBaseImage = "kindest/base:v20210327-a8dff87f@sha256:d25665e921b61ab44d0627ce5a0ef82145e4c2c126e1a938d003bf4087349542"
23+
const DefaultBaseImage = "kindest/base:v20210328-c17ca167@sha256:0311870f4d35b0f68e2fedb5d703a552a8e7eb438acc67a3bd13982c2bda7487"

0 commit comments

Comments
 (0)