46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: invidious-db
|
|
namespace: default
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: invidious-db
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: invidious-db
|
|
spec:
|
|
initContainers:
|
|
- name: init-cleanup
|
|
image: busybox
|
|
command: ["rm", "-rf", "/var/lib/postgresql/data/lost+found"]
|
|
volumeMounts:
|
|
- name: postgres-data
|
|
mountPath: /var/lib/postgresql/data
|
|
containers:
|
|
- name: postgres
|
|
image: postgres:14
|
|
env:
|
|
- name: POSTGRES_DB
|
|
value: invidious
|
|
- name: POSTGRES_USER
|
|
value: kemal
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: invidious-postgres-secret
|
|
key: password
|
|
ports:
|
|
- containerPort: 5432
|
|
volumeMounts:
|
|
- name: postgres-data
|
|
mountPath: /var/lib/postgresql/data
|
|
volumes:
|
|
- name: postgres-data
|
|
persistentVolumeClaim:
|
|
claimName: longhorn-invidious-config
|