Skip to content

Commit

Permalink
Merge pull request #112 from xshyamx/patch-2
Browse files Browse the repository at this point in the history
add support for extra nameservers for specific domains
  • Loading branch information
altvnk committed Jun 9, 2016
2 parents ce948dd + c779961 commit 57d8204
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ dns_setup: true
# Number of replicas of DNS instances started on kubernetes
dns_replicas: 1

# specify extra upstream dns servers for specific domains
#dns_extra:
# cisco.com:
# - 72.163.5.201
# - 64.102.255.44
# - 173.37.146.41

# Set to 'false' to disable default Kubernetes UI setup
enable_ui: true

Expand Down
11 changes: 10 additions & 1 deletion roles/dnsmasq/templates/01-kube-dns.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@ server=8.8.8.8
server=8.8.4.4

# Forward k8s domain to kube-dns
server=/{{ dns_domain }}/{{ dns_server }}
server=/{{ dns_domain }}/{{ dns_server }}

{% if dns_extra is defined and dns_extra is iterable %}
{%- for key, val in dns_extra.iteritems() %}
{%- for nameserver in val %}

server=/{{ key }}/{{ nameserver }}
{%- endfor %}
{%- endfor %}
{% endif %}

0 comments on commit 57d8204

Please sign in to comment.