This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
/
deployment.yaml
87 lines (86 loc) · 2.51 KB
/
deployment.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
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "unbound.fullname" . }}
labels:
app: {{ template "unbound.name" . }}
chart: {{ template "unbound.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "unbound.name" . }}
release: {{ .Release.Name }}
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
template:
metadata:
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "unbound.name" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
containers:
- name: "unbound"
image: {{ .Values.unbound.image.repository }}:{{ .Values.unbound.image.tag }}
imagePullPolicy: {{ .Values.unbound.image.pullPolicy | quote }}
{{- with .Values.resources }}
resources:
{{ toYaml . | indent 10 }}
{{- end }}
ports:
- name: "dns-udp"
containerPort: {{ .Values.unbound.serverPort }}
protocol: "UDP"
- name: "dns-tcp"
containerPort: {{ .Values.unbound.serverPort }}
protocol: "TCP"
volumeMounts:
- name: "unbound-conf"
mountPath: "/etc/unbound/"
readOnly: true
livenessProbe:
httpGet:
path: "/healthz"
port: 8080
initialDelaySeconds: 5
timeoutSeconds: 2
readinessProbe:
httpGet:
path: "/healthz"
port: 8080
initialDelaySeconds: 5
timeoutSeconds: 2
- name: "healthz"
image: {{ .Values.healthz.image.repository }}:{{ .Values.healthz.image.tag }}
imagePullPolicy: {{ .Values.healthz.image.pullPolicy | quote }}
args:
- "-cmd=nslookup health.check.unbound 127.0.0.1:{{ .Values.unbound.serverPort }} > /dev/null"
ports:
- name: healthz
containerPort: 8080
protocol: TCP
volumes:
- name: "unbound-conf"
configMap:
name: {{ template "unbound.fullname" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}