allow to pass options to dnsmasq service

There were request to pass parameters to dnsmasq container in kube-dns
addon.

This PR adds variable master.addons.dns.dnsmasq (dict) which can be
used to pass options to dnsmasq container. Defaults are configured in
metadata.

Change-Id: If072e31a8a1cde4c984c67373ad74d45204619b0
This commit is contained in:
Tomáš Kukrál 2017-01-24 18:43:57 +01:00
parent 7f43ee0b04
commit 398e9267b8
3 changed files with 16 additions and 5 deletions

View File

@ -71,10 +71,11 @@ spec:
successThreshold: 1
failureThreshold: 5
args:
- --cache-size=1000
- --no-resolv
- --server=127.0.0.1#10053
- --log-facility=-
{%- if master.addons.dns.get('dnsmasq', {}) %}
{%- for option_name, option_value in master.addons.dns.dnsmasq.iteritems() %}
- --{{ option_name }}{% if option_value %}={{ option_value }}{% endif %}
{%- endfor %}
{%- endif %}
ports:
- containerPort: 53
name: dns
@ -100,4 +101,4 @@ spec:
ports:
- containerPort: 8080
protocol: TCP
dnsPolicy: Default # Don't use cluster DNS.
dnsPolicy: Default # Don't use cluster DNS.

View File

@ -32,6 +32,11 @@ parameters:
replicas: 1
domain: cluster.local
server: 10.254.0.10
dnsmasq:
cache-size: 1000
no-resolv:
server: 127.0.0.1#10053
log-facility: "-"
dashboard:
enabled: True
heapster_influxdb:

View File

@ -28,6 +28,11 @@ parameters:
replicas: 1
domain: cluster.local
server: 10.254.0.10
dnsmasq:
cache-size: 1000
no-resolv:
server: 127.0.0.1#10053
log-facility: "-"
dashboard:
enabled: True
heapster_influxdb: