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
diff --git a/kubernetes/files/kube-addons/dns/skydns-rc.yaml b/kubernetes/files/kube-addons/dns/skydns-rc.yaml
index 984bb5c..d5901fe 100644
--- a/kubernetes/files/kube-addons/dns/skydns-rc.yaml
+++ b/kubernetes/files/kube-addons/dns/skydns-rc.yaml
@@ -71,10 +71,11 @@
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 @@
ports:
- containerPort: 8080
protocol: TCP
- dnsPolicy: Default # Don't use cluster DNS.
\ No newline at end of file
+ dnsPolicy: Default # Don't use cluster DNS.
diff --git a/metadata/service/master/cluster.yml b/metadata/service/master/cluster.yml
index 46d391f..62e1042 100644
--- a/metadata/service/master/cluster.yml
+++ b/metadata/service/master/cluster.yml
@@ -32,6 +32,11 @@
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:
diff --git a/metadata/service/master/single.yml b/metadata/service/master/single.yml
index 4c4fcf2..6a56ca5 100644
--- a/metadata/service/master/single.yml
+++ b/metadata/service/master/single.yml
@@ -28,6 +28,11 @@
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: