Synapse/manifests/bridges/whatsapp/job.yaml

47 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2024-12-16 10:53:36 +00:00
apiVersion: batch/v1
kind: Job
metadata:
name: whatsapp-db-init
namespace: synapse
spec:
template:
spec:
containers:
- name: whatsapp-db-init
image: postgres:15.10
command: ["/bin/bash", "/data/create_db.sh"]
env:
- name: PGHOST
value: synapse-db-rw.synapse.svc.cluster.local
- name: PGUSER
valueFrom:
secretKeyRef:
name: synapse-db-superuser
key: username
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: synapse-db-superuser
key: password
- name: WHATSAPP_USER
valueFrom:
secretKeyRef:
name: mautrix-whatsapp-db
key: username
- name: WHATSAPP_PASSWORD
valueFrom:
secretKeyRef:
name: mautrix-whatsapp-db
key: password
- name: WHATSAPP_DB
value: whatsapp
volumeMounts:
- name: create-db
mountPath: /data
volumes:
- name: create-db
configMap:
name: whatsapp-db-creation
restartPolicy: Never
backoffLimit: 4