forked from instana/robot-shop
-
Notifications
You must be signed in to change notification settings - Fork 2k
/
mysql-deployment.yaml
49 lines (49 loc) · 1.14 KB
/
mysql-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
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
labels:
service: mysql
spec:
replicas: 1
selector:
matchLabels:
service: mysql
template:
metadata:
labels:
service: mysql
spec:
{{ if .Values.psp.enabled }}
serviceAccountName: robot-shop
{{ end }}
containers:
- name: mysql
image: {{ .Values.image.repo }}/rs-mysql-db:{{ .Values.image.version }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
# added for Istio
securityContext:
capabilities:
add: ["NET_ADMIN"]
ports:
- containerPort: 3306
resources:
limits:
cpu: 200m
memory: 1024Mi
requests:
cpu: 100m
memory: 700Mi
restartPolicy: Always
{{- with .Values.mysql.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.mysql.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.mysql.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}