Mautrix-discord bridge
This commit is contained in:
parent
dc732ee3ec
commit
6d5e3d514a
9 changed files with 155 additions and 8 deletions
|
|
@ -2,7 +2,6 @@ apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: data-restorer
|
name: data-restorer
|
||||||
namespace: matrix
|
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: alpine
|
- name: alpine
|
||||||
|
|
@ -14,4 +13,4 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: target-volume
|
- name: target-volume
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: postgres-data
|
claimName: mautrix-discord-data
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: keel
|
app: keel
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/arch: amd64 # Official image does not have arm support
|
||||||
serviceAccountName: keel
|
serviceAccountName: keel
|
||||||
containers:
|
containers:
|
||||||
- name: keel
|
- name: keel
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ data:
|
||||||
media_store_path: "/data/media_store"
|
media_store_path: "/data/media_store"
|
||||||
uploads_path: "/data/uploads"
|
uploads_path: "/data/uploads"
|
||||||
|
|
||||||
|
app_service_config_files:
|
||||||
|
- /data/discord-registration.yaml
|
||||||
|
|
||||||
serve_server_wellknown: true
|
serve_server_wellknown: true
|
||||||
serve_client_wellknown: true
|
serve_client_wellknown: true
|
||||||
|
|
||||||
|
|
|
||||||
66
services/mautrix-discord/mautrix-discord-deployment.yaml
Normal file
66
services/mautrix-discord/mautrix-discord-deployment.yaml
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mautrix-discord
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mautrix-discord
|
||||||
|
annotations:
|
||||||
|
keel.sh/policy: "all"
|
||||||
|
keel.sh/match-tag: "true"
|
||||||
|
keel.sh/schedule: "0 3 * * *"
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: mautrix-discord
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mautrix-discord
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mautrix-discord
|
||||||
|
image: dock.mau.dev/mautrix/discord:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 29334
|
||||||
|
name: appservice
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mautrix-discord-data
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mautrix-discord-postgres
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mautrix-discord-postgres
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mautrix-discord-postgres
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: postgres
|
||||||
|
image: postgres:16-alpine
|
||||||
|
ports:
|
||||||
|
- containerPort: 5432
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: mautrix-discord-secret
|
||||||
|
volumeMounts:
|
||||||
|
- name: postgres-storage
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
subPath: mautrix-discord-data
|
||||||
|
volumes:
|
||||||
|
- name: postgres-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mautrix-discord-postgres-pvc
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: mautrix-discord-secret
|
||||||
|
spec:
|
||||||
|
refreshInterval: "1h"
|
||||||
|
secretStoreRef:
|
||||||
|
name: vault-external-secrets-store
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: mautrix-discord-secret
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: POSTGRES_DB
|
||||||
|
remoteRef:
|
||||||
|
key: mautrix-discord
|
||||||
|
property: postgres-db
|
||||||
|
- secretKey: POSTGRES_USER
|
||||||
|
remoteRef:
|
||||||
|
key: mautrix-discord
|
||||||
|
property: postgres-user
|
||||||
|
- secretKey: POSTGRES_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
key: mautrix-discord
|
||||||
|
property: postgres-pass
|
||||||
28
services/mautrix-discord/mautrix-discord-pvcs.yaml
Normal file
28
services/mautrix-discord/mautrix-discord-pvcs.yaml
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mautrix-discord-data
|
||||||
|
labels:
|
||||||
|
recurring-job.longhorn.io/source: "enabled"
|
||||||
|
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mautrix-discord-postgres-pvc
|
||||||
|
labels:
|
||||||
|
recurring-job.longhorn.io/source: "enabled"
|
||||||
|
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||||
|
spec:
|
||||||
|
storageClassName: longhorn
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
25
services/mautrix-discord/mautrix-discord-service.yaml
Normal file
25
services/mautrix-discord/mautrix-discord-service.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mautrix-discord
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mautrix-discord
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 29334
|
||||||
|
targetPort: 29334
|
||||||
|
name: appservice
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mautrix-discord
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mautrix-discord-postgres
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 5432
|
||||||
|
targetPort: 5432
|
||||||
|
selector:
|
||||||
|
app: mautrix-discord-postgres
|
||||||
|
|
@ -28,7 +28,7 @@ spec:
|
||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
containers:
|
containers:
|
||||||
- name: bot
|
- name: bot
|
||||||
image: weaver.mynest.love/nest/nest-matrix-bot:latest
|
image: weaver.mynest.love/the-nest/nest-matrix-bot:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
|
|
@ -67,11 +67,6 @@ spec:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: matrix-bot-credentials
|
name: matrix-bot-credentials
|
||||||
key: client-secret
|
key: client-secret
|
||||||
- name: MATRIX_RECOVERY_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: matrix-bot-credentials
|
|
||||||
key: recovery-key
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /app/store
|
- mountPath: /app/store
|
||||||
name: bot-store
|
name: bot-store
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@ kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: nextcloud-app
|
name: nextcloud-app
|
||||||
namespace: nextcloud
|
namespace: nextcloud
|
||||||
|
annotations:
|
||||||
|
keel.sh/policy: "all"
|
||||||
|
keel.sh/match-tag: "true"
|
||||||
|
keel.sh/schedule: "0 3 * * *"
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue