apiVersion: v1 kind: Service metadata: name: matrix spec: ports: - protocol: TCP name: synapse port: 8008 - protocol: TCP name: db port: 5432 - protocol: TCP name: element port: 80 selector: app: matrix --- apiVersion: apps/v1 kind: Deployment metadata: name: matrix labels: app: matrix spec: replicas: 1 selector: matchLabels: app: matrix template: metadata: labels: app: matrix spec: containers: - name: synapse image: bv11-cr01.bessems.eu/proxy/matrixdotorg/synapse:latest # args: # - generate env: # - name: SYNAPSE_SERVER_NAME # value: spamasaurus.com # - name: SYNAPSE_REPORT_STATS # value: 'no' - name: SYNAPSE_CONFIG_PATH value: /data/homeserver.yaml ports: - name: synapse containerPort: 8008 volumeMounts: - mountPath: /data name: flexvolsmb-matrix-data - name: postgres image: bv11-cr01.bessems.eu/proxy/library/postgres:alpine env: - name: POSTGRES_USER value: synapse - name: POSTGRES_PASSWORD value: synapse - name: POSTGRES_INITDB_ARGS value: --encoding=UTF-8 --lc-collate=C --lc-ctype=C ports: - name: db containerPort: 5432 volumeMounts: - mountPath: /var/lib/postgresql/data name: flexvolsmb-matrix-db - name: element image: bv11-cr01.bessems.eu/proxy/vectorim/element-web ports: - name: element containerPort: 80 volumeMounts: - name: configmap-matrix-config mountPath: /usr/share/nginx/html/config.json subPath: config.json volumes: - name: flexvolsmb-matrix-data persistentVolumeClaim: claimName: flexvolsmb-matrix-data - name: flexvolsmb-matrix-db persistentVolumeClaim: claimName: flexvolsmb-matrix-db - name: configmap-matrix-config configMap: name: configmap-matrix-config --- apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: matrix spec: entryPoints: - websecure routes: - match: Host(`synapse.chat.spamasaurus.com`) kind: Rule services: - name: matrix port: 8008 middlewares: - name: security-headers@file - name: compression@file - name: matrix-cors-headers - match: Host(`chat.spamasaurus.com`) kind: Rule services: - name: matrix port: 80 middlewares: - name: security-headers@file - name: compression@file - name: matrix-cors-headers --- apiVersion: v1 kind: PersistentVolume metadata: name: flexvolsmb-matrix-data spec: capacity: storage: 1Gi accessModes: - ReadWriteMany storageClassName: flexvolsmb-matrix-data flexVolume: driver: mount/smb secretRef: name: smb-secret options: opts: domain=bessems.eu,file_mode=0777,dir_mode=0777,iocharset=utf8 server: 192.168.11.225 share: /K3s.Volumes/matrix/data --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: flexvolsmb-matrix-data namespace: default spec: accessModes: - ReadWriteMany storageClassName: flexvolsmb-matrix-data resources: requests: storage: 1Gi --- apiVersion: v1 kind: PersistentVolume metadata: name: flexvolsmb-matrix-db spec: capacity: storage: 1Gi accessModes: - ReadWriteMany storageClassName: flexvolsmb-matrix-db flexVolume: driver: mount/smb secretRef: name: smb-secret options: opts: domain=bessems.eu,file_mode=0600,dir_mode=0700,uid=70,gid=70,iocharset=utf8,nobrl server: 192.168.11.225 share: /K3s.Volumes/matrix/db --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: flexvolsmb-matrix-db namespace: default spec: accessModes: - ReadWriteMany storageClassName: flexvolsmb-matrix-db resources: requests: storage: 1Gi