blob: 1698f0fc88375cb21be2e7a1a4ebf04f84450667 (
plain) (
blame)
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
|
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: emc
name: stats-mysql
labels:
app: mysql
tier: stats
spec:
serviceName: stats-mysql
replicas: 1
selector:
matchLabels:
app: mysql
tier: stats
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: mysql
tier: stats
spec:
nodeName: emc-stats
securityContext:
runAsUser: 27
fsGroup: 27
initContainers:
- name: prepare-mysql-volumes
image: busybox
command: ['sh', '-c', 'chown 27:27 /srv/lib && chmod 700 /srv/lib && mkdir -p /srv/tmp/log /srv/tmp/run /srv/tmp/files && ln -s /dev/stderr /srv/tmp/log/mysqld.log && chown 27:27 /srv/tmp/log/mysqld.log /srv/tmp/run /srv/tmp/files']
securityContext:
runAsUser: 0
volumeMounts:
- name: mysql-lib
mountPath: /srv/lib
- name: mysql-tmp
mountPath: /srv/tmp
containers:
- name: mysql
image: quay.io/neith00/mysql-docker@sha256:4cbb499347edd4265bf53ceda6a3bbda28bc84391d7ab768f52bc44d5c8c25f9
imagePullPolicy: Always
env:
- name: MYSQL_ROOT_PASSWORD
value: /var/run/mysql-secret/password
volumeMounts:
- name: mysql-lib
mountPath: /var/lib/mysql
- name: mysql-tmp
subPath: log
mountPath: /var/log
- name: mysql-tmp
subPath: run
mountPath: /var/run/mysqld
- name: mysql-tmp
subPath: files
mountPath: /var/lib/mysql-files/
- name: mysql-secret
mountPath: /var/run/mysql-secret/
volumes:
- name: mysql-lib
hostPath:
type: DirectoryOrCreate
path: /srv/stats/mysql
- name: mysql-tmp
emptyDir:
medium: Memory
- name: mysql-secret
secret:
secretName: stats-mysql-root
defaultMode: 0400
|