Skip to content

Commit 127c3e6

Browse files
authored
Drop dnsmasq as dns cache option (#9413)
Drops `dnsmasq` as option for `dns_cache` and drops the `dns_cache` config-item, making `unbound` the only DNS cache option. `unbound` is already the default in all clusters so this is just a cleanup to get rid of dnsmasq.
2 parents 59c4c8e + 38473e8 commit 127c3e6

File tree

2 files changed

+0
-99
lines changed

2 files changed

+0
-99
lines changed

cluster/config-defaults.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -921,16 +921,9 @@ external_dns_zones_cache_duration: "1h"
921921
# resource configuration
922922
external_dns_mem: "4Gi"
923923

924-
# select which cache to use for Cluster DNS: unbound or dnsmasq.
925-
dns_cache: "unbound"
926-
927924
expirimental_dns_unbound_liveness_probe: "true"
928925

929926
# DNS container resources
930-
dns_dnsmasq_cpu: "100m"
931-
dns_dnsmasq_mem: "50Mi"
932-
dns_dnsmasq_sidecar_cpu: "10m"
933-
dns_dnsmasq_sidecar_mem: "45Mi"
934927
dns_unbound_cpu: "100m"
935928
dns_unbound_mem: "50Mi"
936929
dns_unbound_exporter_cpu: "10m"

cluster/manifests/01-coredns-local/daemonset-coredns.yaml

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ spec:
4242
cpu: 1m
4343
memory: 50Mi
4444
containers:
45-
{{ if eq .Cluster.ConfigItems.dns_cache "unbound" }}
4645
- name: unbound
4746
{{- if eq .Cluster.Provider "zalando-eks" }}
4847
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/unbound:1.22.0-master-10
@@ -119,95 +118,6 @@ spec:
119118
- mountPath: /run/unbound
120119
name: unbound-socket
121120
readOnly: false
122-
{{ end }}
123-
{{ if eq .Cluster.ConfigItems.dns_cache "dnsmasq" }}
124-
- name: dnsmasq
125-
{{- if eq .Cluster.Provider "zalando-eks" }}
126-
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/k8s-dns-dnsmasq-nanny:1.17.4-master-15
127-
{{- else }}
128-
image: container-registry.zalando.net/teapot/k8s-dns-dnsmasq-nanny:1.17.4-master-15
129-
{{- end }}
130-
securityContext:
131-
privileged: true
132-
livenessProbe:
133-
httpGet:
134-
path: /healthcheck/dnsmasq
135-
port: 9054
136-
scheme: HTTP
137-
initialDelaySeconds: 60
138-
timeoutSeconds: 5
139-
successThreshold: 1
140-
failureThreshold: 5
141-
args:
142-
- -v=2
143-
- -logtostderr
144-
- -configDir=/etc/k8s/dns/dnsmasq-nanny
145-
- -restartDnsmasq=true
146-
- --
147-
- --no-resolv
148-
- --keep-in-foreground
149-
- --log-facility=-
150-
- --cache-size=50000
151-
- --dns-forward-max=500
152-
- --neg-ttl=60
153-
# send requests to the last server first, only fallback to the previous ones if it's unreachable
154-
- --strict-order
155-
- --server=10.5.0.11#53 # TODO: fix this for ipv6
156-
- --server={{ if eq .Cluster.ConfigItems.eks_ip_family "ipv4" }}127.0.0.1{{else}}::1{{end}}#9254
157-
ports:
158-
- containerPort: 53
159-
name: dns
160-
protocol: UDP
161-
- containerPort: 53
162-
name: dns-tcp
163-
protocol: TCP
164-
resources:
165-
requests:
166-
ephemeral-storage: 256Mi
167-
limits:
168-
cpu: {{.Cluster.ConfigItems.dns_dnsmasq_cpu}}
169-
memory: {{.Cluster.ConfigItems.dns_dnsmasq_mem}}
170-
lifecycle:
171-
preStop:
172-
sleep:
173-
seconds: 35
174-
- name: sidecar
175-
{{- if eq .Cluster.Provider "zalando-eks" }}
176-
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/k8s-dns-sidecar:1.17.4-master-15
177-
{{- else }}
178-
image: container-registry.zalando.net/teapot/k8s-dns-sidecar:1.17.4-master-15
179-
{{- end }}
180-
securityContext:
181-
privileged: true
182-
livenessProbe:
183-
httpGet:
184-
path: /metrics
185-
port: 9054
186-
scheme: HTTP
187-
initialDelaySeconds: 60
188-
timeoutSeconds: 5
189-
successThreshold: 1
190-
failureThreshold: 5
191-
args:
192-
- --v=2
193-
- --logtostderr
194-
- --probe=dnsmasq,127.0.0.1:9254,ec2.amazonaws.com,5,A
195-
- --prometheus-port=9054
196-
ports:
197-
- containerPort: 9054
198-
name: metrics
199-
protocol: TCP
200-
resources:
201-
requests:
202-
ephemeral-storage: 256Mi
203-
limits:
204-
cpu: {{.Cluster.ConfigItems.dns_dnsmasq_sidecar_cpu}}
205-
memory: {{.Cluster.ConfigItems.dns_dnsmasq_sidecar_mem}}
206-
lifecycle:
207-
preStop:
208-
sleep:
209-
seconds: 35
210-
{{ end }}
211121
- name: coredns
212122
{{- if eq .Cluster.Provider "zalando-eks" }}
213123
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/coredns:1.12.1-master-26
@@ -299,7 +209,5 @@ spec:
299209
path: Corefile
300210
- key: unbound.conf
301211
path: unbound.conf
302-
{{- if eq .Cluster.ConfigItems.dns_cache "unbound" }}
303212
- name: unbound-socket
304213
emptyDir: {}
305-
{{- end }}

0 commit comments

Comments
 (0)