add companion, configmap, db, ingress, secrets, svc and deployment for invidious
This commit is contained in:
59
clusters/ipv6/media/invidious/invidious-db.yml
Normal file
59
clusters/ipv6/media/invidious/invidious-db.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: invidious-db
|
||||
namespace: media
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: invidious-db
|
||||
serviceName: invidious-db
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: invidious-db
|
||||
spec:
|
||||
initContainers:
|
||||
- name: clean-db-dir
|
||||
image: busybox
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
rm -rf /var/lib/postgresql/lost+found
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:18
|
||||
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
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: postgres-data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: longhorn
|
||||
Reference in New Issue
Block a user