matrix.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: matrix
  6. ---
  7. apiVersion: v1
  8. kind: PersistentVolumeClaim
  9. metadata:
  10. name: matrix-pvc
  11. namespace: matrix
  12. labels:
  13. app: matrix
  14. spec:
  15. storageClassName: ceph-block
  16. accessModes:
  17. - ReadWriteOnce
  18. resources:
  19. requests:
  20. storage: 20Gi
  21. ---
  22. apiVersion: apps/v1
  23. kind: Deployment
  24. metadata:
  25. name: matrix
  26. namespace: matrix
  27. spec:
  28. selector:
  29. matchLabels:
  30. app: matrix
  31. replicas: 1
  32. template:
  33. metadata:
  34. labels:
  35. app: matrix
  36. spec:
  37. containers:
  38. - name: matrix
  39. image: matrixdotorg/synapse:v1.71.0
  40. ports:
  41. - containerPort: 8008
  42. name: http-web-svc
  43. volumeMounts:
  44. - mountPath: "/data"
  45. name: data
  46. livenessProbe:
  47. httpGet:
  48. path: /_matrix/static
  49. port: 8008
  50. failureThreshold: 10
  51. initialDelaySeconds: 30
  52. periodSeconds: 30
  53. timeoutSeconds: 10
  54. volumes:
  55. - name: data
  56. persistentVolumeClaim:
  57. claimName: matrix-pvc
  58. ---
  59. apiVersion: v1
  60. kind: Service
  61. metadata:
  62. name: matrix-service
  63. namespace: matrix
  64. spec:
  65. selector:
  66. app: matrix
  67. type: ClusterIP
  68. ports:
  69. - name: matrix-web-port
  70. protocol: TCP
  71. port: 8008
  72. targetPort: http-web-svc
  73. ---
  74. apiVersion: traefik.containo.us/v1alpha1
  75. kind: IngressRoute
  76. metadata:
  77. name: matrix
  78. namespace: matrix
  79. spec:
  80. entryPoints:
  81. - websecure
  82. routes:
  83. - kind: Rule
  84. match: Host(`matrix.jibby.org`)
  85. services:
  86. - kind: Service
  87. name: matrix-service
  88. port: 8008