-
Notifications
You must be signed in to change notification settings - Fork 2
/
deployment.yaml
88 lines (88 loc) · 2.78 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
87
88
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "adguard.fullname" . }}-primary
labels:
app.kubernetes.io/name: {{ template "adguard.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "adguard-primary"
{{- include "labels" . | nindent 4 }}
spec:
revisionHistoryLimit: 0
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: {{ template "adguard.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "adguard-primary"
{{- include "labels" . | nindent 6 }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ template "adguard.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "adguard-primary"
{{- include "labels" . | nindent 8 }}
spec:
initContainers:
- name: adguard-sync
image: "{{ .Values.sync.image.registry }}/{{ .Values.sync.image.repository }}:{{ .Values.sync.image.tag }}"
restartPolicy: Always
imagePullPolicy: IfNotPresent
args:
- run
envFrom:
- configMapRef:
name: {{ template "adguard.fullname" . }}-sync-config
ports:
- name: metrics
protocol: TCP
containerPort: 8080
livenessProbe:
httpGet:
port: metrics
path: /metrics
failureThreshold: 5
periodSeconds: 10
readinessProbe:
httpGet:
port: metrics
path: /metrics
failureThreshold: 5
periodSeconds: 10
containers:
- name: adguard
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent
env:
- name: TZ
value: "Europe/Amsterdam"
args:
- --web-addr
- 0.0.0.0:3000
- --config
- /opt/adguardhome/conf/AdGuardHome.yaml
- --work-dir
- /opt/adguardhome/work
- --no-check-update
ports:
- name: web
protocol: TCP
containerPort: 3000
resources: {{ toYaml .Values.primary.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /opt/adguardhome/conf
subPath: conf
- name: data
mountPath: /opt/adguardhome/work
subPath: work
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ template "adguard.fullname" . }}-primary-data
tolerations:
- key: essential
operator: Exists