matrix-sleep.yaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. ---
  2. kind: Deployment
  3. apiVersion: apps/v1
  4. metadata:
  5. name: matrix
  6. labels:
  7. app: matrix
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: matrix
  13. template:
  14. metadata:
  15. labels:
  16. app: matrix
  17. spec:
  18. containers:
  19. - name: matrix
  20. image: ghcr.io/element-hq/synapse
  21. command: ["/bin/bash", "-c", "--"]
  22. args: ["while true; do sleep 3; done;"]
  23. env:
  24. - name: SYNAPSE_SERVER_NAME
  25. value: "matrix.dezendorf.net"
  26. - name: SYNAPSE_CONFIG_PATH
  27. value: "/data/homeserver.yaml"
  28. ports:
  29. - name: web
  30. containerPort: 8008
  31. volumeMounts:
  32. - name: "matrix-homeserver-yaml"
  33. mountPath: "/data/homeserver.yaml"
  34. subPath: "homeserver-yaml"
  35. readOnly: no
  36. - name: "matrix-homeserver-yaml"
  37. mountPath: "/homeserver.log"
  38. subPath: "homeserver-log"
  39. readOnly: no
  40. - name: "matrix-homeserver-yaml"
  41. mountPath: "/data/matrix.dezendorf.net.log.config"
  42. subPath: "homeserver-log-config"
  43. readOnly: no
  44. - name: "matrix-data-volume"
  45. mountPath: "/data"
  46. readOnly: no
  47. - name: "matrix-media-volume"
  48. mountPath: "/data/media_store"
  49. volumes:
  50. - name: "matrix-media-volume"
  51. persistentVolumeClaim:
  52. claimName: "matrix-media-pvc"
  53. - name: "matrix-data-volume"
  54. persistentVolumeClaim:
  55. claimName: "matrix-data-pvc"
  56. - name: "matrix-homeserver-yaml"
  57. configMap:
  58. defaultMode: 0777
  59. name: "matrix-homeserver-yaml"
  60. ---
  61. apiVersion: v1
  62. kind: PersistentVolumeClaim
  63. metadata:
  64. name: matrix-data-pvc
  65. spec:
  66. accessModes:
  67. - ReadWriteOnce
  68. storageClassName: longhorn
  69. resources:
  70. requests:
  71. storage: 50G
  72. ---
  73. apiVersion: v1
  74. kind: PersistentVolumeClaim
  75. metadata:
  76. name: matrix-media-pvc
  77. spec:
  78. accessModes:
  79. - ReadWriteOnce
  80. storageClassName: nfs
  81. resources:
  82. requests:
  83. storage: 100G
  84. ---
  85. apiVersion: v1
  86. kind: Service
  87. metadata:
  88. name: matrix
  89. spec:
  90. type: ClusterIP
  91. ports:
  92. - name: web
  93. port: 8008
  94. selector:
  95. app: matrix
  96. ---
  97. apiVersion: traefik.containo.us/v1alpha1
  98. kind: IngressRoute
  99. metadata:
  100. name: matrix-ingress-route
  101. namespace: default
  102. spec:
  103. entryPoints:
  104. - web
  105. routes:
  106. - match: ((Host(`matrix`)||Host(`matrix.dezendorf.net`)))
  107. kind: Rule
  108. priority: 1
  109. services:
  110. - name: matrix
  111. port: 8008
  112. ---
  113. apiVersion: traefik.containo.us/v1alpha1
  114. kind: IngressRoute
  115. metadata:
  116. name: matrix-websecure-route
  117. namespace: default
  118. spec:
  119. entryPoints:
  120. - websecure
  121. routes:
  122. - match: Host(`matrix.dezendorf.net`)
  123. kind: Rule
  124. services:
  125. - name: matrix
  126. port: 8008
  127. tls:
  128. certResolver: myresolver
  129. ---
  130. apiVersion: v1
  131. kind: ConfigMap
  132. metadata:
  133. name: matrix-homeserver-yaml
  134. namespace: default
  135. data:
  136. homeserver-log: |
  137. homeserver-yaml: |
  138. # Configuration file for Synapse.
  139. #
  140. # This is a YAML file: see [1] for a quick introduction. Note in particular
  141. # that *indentation is important*: all the elements of a list or dictionary
  142. # should have the same indentation.
  143. #
  144. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  145. #
  146. # For more information on how to configure Synapse, including a complete accounting of
  147. # each option, go to docs/usage/configuration/config_documentation.md or
  148. # https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
  149. server_name: "matrix.dezendorf.net"
  150. pid_file: /data/homeserver.pid
  151. listeners:
  152. - port: 8008
  153. tls: false
  154. type: http
  155. x_forwarded: true
  156. #bind_addresses: ['::1', '127.0.0.1']
  157. resources:
  158. - names: [client, federation]
  159. compress: false
  160. database:
  161. name: sqlite3
  162. args:
  163. database: /data/homeserver.db
  164. log_config: "/data/matrix.dezendorf.net.log.config"
  165. media_store_path: /data/media_store
  166. registration_shared_secret: "9.^i#+7YXwrC^bzKMqkenOZb;9ra6jV0zgZMvO:EBQ.CipL47k"
  167. report_stats: false
  168. macaroon_secret_key: ".ughvXa0Or.Xv7o5y550cXnTlv.J8*Mq@JAA^1QXuu2bpR@Lpd"
  169. form_secret: "iESBV0d@Tg;4~:v5KT3-UX.Kva@.cbJZ9SNU:nWKubPo:X^*Y-"
  170. signing_key_path: "/data/matrix.dezendorf.net.signing.key"
  171. enable_registration: true
  172. enable_registration_captcha: true
  173. public_baseurl: "https://matrix.dezendorf.net"
  174. recaptcha_public_key: "6LddQ7EqAAAAACWLD1ZKUBKrLHoFvGWhFiNmrgPh"
  175. recaptcha_private_key: "6LddQ7EqAAAAAOX7Qrn2PL-s2r5Zo4c_aTi4uzkh"
  176. trusted_key_servers:
  177. - server_name: "matrix.org"
  178. homeserver-log-config: |
  179. version: 1
  180. formatters:
  181. precise:
  182. format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
  183. handlers:
  184. console:
  185. class: logging.StreamHandler
  186. formatter: precise
  187. loggers:
  188. # This is just here so we can leave `loggers` in the config regardless of whether
  189. # we configure other loggers below (avoid empty yaml dict error).
  190. _placeholder:
  191. level: "INFO"
  192. handlers: [console]
  193. synapse.storage.SQL:
  194. # beware: increasing this to DEBUG will make synapse log sensitive
  195. # information such as access tokens.
  196. level: INFO
  197. handlers: [console]
  198. root:
  199. level: INFO
  200. handlers: [console]
  201. disable_existing_loggers: false