Synapse/manifests/bridges/discord/job.yaml

47 lines
1.3 KiB
YAML
Raw Normal View History

2024-12-16 15:52:47 +00:00
apiVersion: batch/v1
kind: Job
metadata:
name: discord-db-init
namespace: synapse
spec:
template:
spec:
containers:
- name: discord-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: DISCORD_USER
valueFrom:
secretKeyRef:
name: mautrix-discord-db
key: username
- name: DISCORD_PASSWORD
valueFrom:
secretKeyRef:
name: mautrix-discord-db
key: password
- name: DISCORD_DB
value: discord
volumeMounts:
- name: create-db
mountPath: /data
volumes:
- name: create-db
configMap:
name: discord-db-creation
restartPolicy: Never
backoffLimit: 4