Skip to content

Commit

Permalink
[resolver] 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 3ad2b8c commit 647e943
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 34 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- [OAuth] Return correct state value back to client

### Removed
- Nginx resolver directive auto detection. Rely on internal DNS resolver [PR #237](https://github.com/3scale/apicast/pull/237)

## [3.0.0-alpha1] - 2017-01-16
### Added
Expand Down
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 647e943

Please sign in to comment.