Skip to content

Commit

Permalink
remove nginx resolver directive
Browse files Browse the repository at this point in the history
and try to rely on our resolver exclusively
  • Loading branch information
mikz committed Jan 20, 2017
1 parent b0ef31c commit c1a3eef
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
5 changes: 0 additions & 5 deletions apicast/.s2i/bin/assemble

This file was deleted.

28 changes: 0 additions & 28 deletions apicast/bin/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,6 @@ if [ "${AUTO_UPDATE_INTERVAL}" != 0 ] && [ "${AUTO_UPDATE_INTERVAL}" -lt 60 ]; t
exit 1
fi

pick_dns_server() {
DNS=$(grep nameserver /etc/resolv.conf | awk {'print $2'})

if [ -z "$DNS" ]; then
echo "127.0.0.1"
else
for server in $DNS; do
if (nslookup -timeout=1 -retry=3 redhat.com "$server" &> /dev/null); then
echo "$server"
exit 0
fi
done

(>&2 echo "error: no working DNS server found")
exit 1
fi
}


export NAMESERVER

NAMESERVER=$(pick_dns_server)

export RESOLVER=${RESOLVER:-${NAMESERVER}}

mkdir -pv "$(pwd)/http.d"
echo "resolver ${RESOLVER};" > "$(pwd)/http.d/resolver.conf"

THREESCALE_PORTAL_ENDPOINT="${THREESCALE_PORTAL_ENDPOINT:-}"
THREESCALE_CONFIG_FILE="${THREESCALE_CONFIG_FILE:-}"

Expand Down
1 change: 0 additions & 1 deletion apicast/http.d/resolver.conf

This file was deleted.

0 comments on commit c1a3eef

Please sign in to comment.