Skip to content

Commit

Permalink
Merge pull request #2165 from aojea/ahosts
Browse files Browse the repository at this point in the history
don't use loopback addresses on the nodes resolv.conf file
  • Loading branch information
k8s-ci-robot authored Mar 28, 2021
2 parents 83b25fd + 3f0d1f7 commit 8fe8b96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion images/base/files/usr/local/bin/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ enable_network_magic(){
# first we need to detect an IP to use for reaching the docker host
local docker_host_ip
docker_host_ip="$( (getent ahostsv4 'host.docker.internal' | head -n1 | cut -d' ' -f1) || true)"
if [[ -z "${docker_host_ip}" ]]; then
# if the ip doesn't exist or is a loopback address use the default gateway
if [[ -z "${docker_host_ip}" ]] || [[ $docker_host_ip =~ ^127\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
docker_host_ip=$(ip -4 route show default | cut -d' ' -f3)
fi

Expand Down
2 changes: 1 addition & 1 deletion pkg/build/nodeimage/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ package nodeimage
const DefaultImage = "kindest/node:latest"

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

0 comments on commit 8fe8b96

Please sign in to comment.