Skip to content

Commit

Permalink
Set more generic DNS resolver in nginx for Kubernetes mode
Browse files Browse the repository at this point in the history
  • Loading branch information
raethlein committed Sep 23, 2019
1 parent 5ece592 commit 86287e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-res/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ execution_mode=${EXECUTION_MODE:-local}
if [ "$execution_mode" == "k8s" ]; then
# make changes to nginx so that it works in Kubernetes as well
# TODO: build into run_nginx.py script
sed -i 's/resolver 127.0.0.11/resolver 10.96.0.10/g' /etc/nginx/nginx.conf
sed -i 's/resolver 127.0.0.11/resolver kube-dns.kube-system.svc.cluster.local/g' /etc/nginx/nginx.conf
namespace="$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)"
sed -i "s/set \$service_suffix ''/set \$service_suffix .$namespace.svc.cluster.local/g" /etc/nginx/nginx.conf

Expand Down

0 comments on commit 86287e5

Please sign in to comment.