68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: mariadb
|
||
|
|
namespace: passbolt
|
||
|
|
spec:
|
||
|
|
replicas: 1
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: mariadb
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: mariadb
|
||
|
|
spec:
|
||
|
|
containers:
|
||
|
|
- name: mariadb
|
||
|
|
image: mariadb:10.11
|
||
|
|
ports:
|
||
|
|
- containerPort: 3306
|
||
|
|
name: mysql
|
||
|
|
env:
|
||
|
|
- name: MYSQL_ROOT_PASSWORD
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: mariadb-secret
|
||
|
|
key: MYSQL_ROOT_PASSWORD
|
||
|
|
- name: MYSQL_DATABASE
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: mariadb-secret
|
||
|
|
key: MYSQL_DATABASE
|
||
|
|
- name: MYSQL_USER
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: mariadb-secret
|
||
|
|
key: MYSQL_USER
|
||
|
|
- name: MYSQL_PASSWORD
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: mariadb-secret
|
||
|
|
key: MYSQL_PASSWORD
|
||
|
|
volumeMounts:
|
||
|
|
- name: mariadb-data
|
||
|
|
mountPath: /var/lib/mysql
|
||
|
|
livenessProbe:
|
||
|
|
exec:
|
||
|
|
command:
|
||
|
|
- mysqladmin
|
||
|
|
- ping
|
||
|
|
- -h
|
||
|
|
- localhost
|
||
|
|
initialDelaySeconds: 30
|
||
|
|
periodSeconds: 10
|
||
|
|
readinessProbe:
|
||
|
|
exec:
|
||
|
|
command:
|
||
|
|
- mysqladmin
|
||
|
|
- ping
|
||
|
|
- -h
|
||
|
|
- localhost
|
||
|
|
initialDelaySeconds: 10
|
||
|
|
periodSeconds: 5
|
||
|
|
volumes:
|
||
|
|
- name: mariadb-data
|
||
|
|
persistentVolumeClaim:
|
||
|
|
claimName: mariadb-pvc
|