-
Notifications
You must be signed in to change notification settings - Fork 11
/
unbound-pre.yaml
206 lines (206 loc) · 4.92 KB
/
unbound-pre.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
apiVersion: v1
automountServiceAccountToken: false
kind: ServiceAccount
metadata:
name: unbound
namespace: internet-egress
---
apiVersion: v1
data:
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: "/usr/local/unbound/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:
cpu: 250m
memory: 1700Mi
requests:
cpu: 25m
memory: 170Mi
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
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