new for companion

This commit is contained in:
2025-04-15 12:56:33 +05:30
parent ca6234ecab
commit 044c52a8f1
5 changed files with 122 additions and 114 deletions

View File

@@ -14,32 +14,51 @@ spec:
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
env:
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: invidious-db-secrets
key: postgres-db
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: invidious-db-secrets
key: postgres-user
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: invidious-db-secrets
key: postgres-password
ports:
- containerPort: 5432
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
livenessProbe:
exec:
command:
- pg_isready
- -U
- kemal
- -d
- invidious
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
exec:
command:
- pg_isready
- -U
- kemal
- -d
- invidious
initialDelaySeconds: 5
periodSeconds: 10
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: longhorn-invidious-config
claimName: longhorn-invidious-config