-
Notifications
You must be signed in to change notification settings - Fork 11
/
unbound.yaml
300 lines (300 loc) · 8.53 KB
/
unbound.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
apiVersion: v1
automountServiceAccountToken: false
kind: ServiceAccount
metadata:
name: unbound
namespace: internet-egress
---
apiVersion: v1
data:
root.hints: |
; This file holds the information on root name servers needed to
; initialize cache of Internet domain name servers
; (e.g. reference this file in the "cache . <file>"
; configuration file of BIND domain name servers).
;
; This file is made available by InterNIC
; under anonymous FTP as
; file /domain/named.cache
; on server FTP.INTERNIC.NET
; -OR- RS.INTERNIC.NET
;
; last update: November 14, 2018
; related version of root zone: 2018111402
;
; FORMERLY NS.INTERNIC.NET
;
. 3600000 NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
;
; FORMERLY NS1.ISI.EDU
;
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 199.9.14.201
B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:200::b
;
; FORMERLY C.PSI.NET
;
. 3600000 NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
;
; FORMERLY TERP.UMD.EDU
;
. 3600000 NS D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
;
; FORMERLY NS.NASA.GOV
;
. 3600000 NS E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
E.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:a8::e
;
; FORMERLY NS.ISC.ORG
;
. 3600000 NS F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
;
; FORMERLY NS.NIC.DDN.MIL
;
. 3600000 NS G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
G.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:12::d0d
;
; FORMERLY AOS.ARL.ARMY.MIL
;
. 3600000 NS H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53
H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53
;
; FORMERLY NIC.NORDU.NET
;
. 3600000 NS I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
;
; OPERATED BY VERISIGN, INC.
;
. 3600000 NS J.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
;
; OPERATED BY RIPE NCC
;
. 3600000 NS K.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
;
; OPERATED BY ICANN
;
. 3600000 NS L.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:9f::42
;
; OPERATED BY WIDE
;
. 3600000 NS M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
; End of file
unbound.conf: |
server:
do-daemonize: no
interface: 0.0.0.0
port: 1053
interface-automatic: yes
access-control: 10.64.0.0/12 allow
chroot: ""
username: ""
directory: "/etc/unbound"
logfile: ""
use-syslog: no
log-time-ascii: yes
log-queries: yes
log-replies: yes
log-local-actions: yes
log-servfail: yes
num-threads: 4
incoming-num-tcp: 2240
outgoing-num-tcp: 1000
num-queries-per-thread: 4096
outgoing-range: 8192
rrset-roundrobin: yes
minimal-responses: yes
extended-statistics: yes
rrset-cache-size: 256m
rrset-cache-slabs: 4
msg-cache-size: 256m
msg-cache-slabs: 4
infra-cache-slabs: 4
key-cache-slabs: 4
so-rcvbuf: 4m
pidfile: "/tmp/unbound.pid"
infra-host-ttl: 60
prefetch: yes
root-hints: "/etc/unbound/root.hints"
trust-anchor-file: "/usr/local/unbound/etc/unbound/root.key"
remote-control:
control-enable: yes
control-interface: 127.0.0.1
control-use-cert: no
kind: ConfigMap
metadata:
name: unbound
namespace: internet-egress
---
apiVersion: v1
kind: Service
metadata:
name: unbound
namespace: internet-egress
spec:
ports:
- name: dns
port: 53
protocol: UDP
targetPort: 1053
- name: dns-tcp
port: 53
protocol: TCP
targetPort: 1053
selector:
app.kubernetes.io/name: unbound
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: unbound
namespace: internet-egress
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: unbound
strategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app.kubernetes.io/name: unbound
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- unbound
topologyKey: cke.cybozu.com/rack
weight: 100
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- unbound
topologyKey: kubernetes.io/hostname
containers:
- args:
- -c
- /etc/unbound/unbound.conf
image: ghcr.io/cybozu/unbound:1.20.0.2
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- sleep
- "5"
livenessProbe:
failureThreshold: 6
initialDelaySeconds: 1
periodSeconds: 1
tcpSocket:
port: 1053
name: unbound
ports:
- containerPort: 1053
name: dns
protocol: UDP
- containerPort: 1053
name: dns-tcp
protocol: TCP
readinessProbe:
periodSeconds: 1
tcpSocket:
port: 1053
resources:
limits:
memory: 1024Mi
requests:
cpu: 100m
memory: 256Mi
securityContext:
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsUser: 10000
volumeMounts:
- mountPath: /etc/unbound
name: config-volume
readOnly: true
- mountPath: /tmp
name: temporary-volume
- args:
- --unbound.ca=
- --unbound.cert=
image: ghcr.io/cybozu/unbound_exporter:0.4.6.2
imagePullPolicy: IfNotPresent
name: exporter
ports:
- containerPort: 9167
name: metrics
resources:
requests:
cpu: 100m
securityContext:
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsUser: 10000
serviceAccountName: unbound
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
key: node.cybozu.io/cluster-not-ready
operator: Exists
volumes:
- configMap:
items:
- key: unbound.conf
path: unbound.conf
- key: root.hints
path: root.hints
name: unbound
name: config-volume
- emptyDir: {}
name: temporary-volume
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: unbound-pdb
namespace: internet-egress
spec:
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: unbound