2019-11-16 17:38:21 +07:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: mariadb
|
|
|
|
namespace: authelia
|
|
|
|
labels:
|
|
|
|
app: mariadb
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: mariadb
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: mariadb
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: mariadb
|
|
|
|
image: mariadb:10.4.10
|
|
|
|
ports:
|
|
|
|
- containerPort: 3306
|
|
|
|
env:
|
|
|
|
- name: SLAPD_ORGANISATION
|
|
|
|
value: MyCompany
|
|
|
|
- name: MYSQL_ROOT_PASSWORD
|
|
|
|
value: rootpassword
|
|
|
|
- name: MYSQL_USER
|
|
|
|
value: admin
|
|
|
|
- name: MYSQL_PASSWORD
|
|
|
|
value: password
|
|
|
|
- name: MYSQL_DATABASE
|
|
|
|
value: authelia
|
|
|
|
volumeMounts:
|
|
|
|
- name: data-volume
|
|
|
|
mountPath: /var/lib/mysql
|
|
|
|
volumes:
|
|
|
|
- name: data-volume
|
|
|
|
hostPath:
|
|
|
|
path: /data/storage/mysql
|
2021-04-11 03:51:00 +07:00
|
|
|
...
|
2019-11-16 17:38:21 +07:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: mariadb-service
|
|
|
|
namespace: authelia
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: mariadb
|
|
|
|
ports:
|
2021-04-11 03:51:00 +07:00
|
|
|
- protocol: TCP
|
|
|
|
port: 3306
|
|
|
|
...
|