55 lines
1008 B
YAML
55 lines
1008 B
YAML
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: bookstack-db
|
|
namespace: bookstack
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 5Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: bookstack-db
|
|
namespace: bookstack
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: bookstack-db
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: bookstack-db
|
|
spec:
|
|
containers:
|
|
- name: mariadb
|
|
image: mariadb:11
|
|
envFrom:
|
|
- secretRef:
|
|
name: bookstack-secret
|
|
ports:
|
|
- containerPort: 3306
|
|
volumeMounts:
|
|
- name: db-data
|
|
mountPath: /var/lib/mysql
|
|
volumes:
|
|
- name: db-data
|
|
persistentVolumeClaim:
|
|
claimName: bookstack-db
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: bookstack-db
|
|
namespace: bookstack
|
|
spec:
|
|
selector:
|
|
app: bookstack-db
|
|
ports:
|
|
- port: 3306
|
|
targetPort: 3306
|