Synapse/manifests/bridges/signal/job.yaml

47 lines
1.3 KiB
YAML
Raw Normal View History

apiVersion: batch/v1
kind: Job
metadata:
name: signal-db-init
namespace: synapse
spec:
template:
spec:
containers:
- name: signal-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: SIGNAL_USER
valueFrom:
secretKeyRef:
name: mautrix-signal-db
key: username
- name: SIGNAL_PASSWORD
valueFrom:
secretKeyRef:
name: mautrix-signal-db
key: password
- name: SIGNAL_DB
value: signal
volumeMounts:
- name: create-db
mountPath: /data
volumes:
- name: create-db
configMap:
name: signal-db-creation
restartPolicy: Never
backoffLimit: 4