Synapse/manifests/bridges/telegram/job.yaml

47 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2024-12-16 14:26:19 +00:00
apiVersion: batch/v1
kind: Job
metadata:
name: telegram-db-init
namespace: synapse
spec:
template:
spec:
containers:
- name: telegram-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: TELEGRAM_USER
valueFrom:
secretKeyRef:
name: mautrix-telegram-db
key: username
- name: TELEGRAM_PASSWORD
valueFrom:
secretKeyRef:
name: mautrix-telegram-db
key: password
- name: TELEGRAM_DB
value: telegram
volumeMounts:
- name: create-db
mountPath: /data
volumes:
- name: create-db
configMap:
name: telegram-db-creation
restartPolicy: Never
backoffLimit: 4