matrix.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. strategy:
  29. type: Recreate
  30. selector:
  31. matchLabels:
  32. app: matrix
  33. replicas: 1
  34. template:
  35. metadata:
  36. labels:
  37. app: matrix
  38. spec:
  39. containers:
  40. - name: matrix
  41. image: matrixdotorg/synapse:v1.71.0
  42. ports:
  43. - containerPort: 8008
  44. name: http-web-svc
  45. volumeMounts:
  46. - mountPath: "/data"
  47. name: data
  48. livenessProbe:
  49. httpGet:
  50. path: /_matrix/static
  51. port: 8008
  52. failureThreshold: 10
  53. initialDelaySeconds: 30
  54. periodSeconds: 30
  55. timeoutSeconds: 10
  56. volumes:
  57. - name: data
  58. persistentVolumeClaim:
  59. claimName: matrix-pvc
  60. ---
  61. apiVersion: v1
  62. kind: Service
  63. metadata:
  64. name: matrix-service
  65. namespace: matrix
  66. spec:
  67. selector:
  68. app: matrix
  69. type: ClusterIP
  70. ports:
  71. - name: matrix-web-port
  72. protocol: TCP
  73. port: 8008
  74. targetPort: http-web-svc
  75. ---
  76. apiVersion: traefik.containo.us/v1alpha1
  77. kind: IngressRoute
  78. metadata:
  79. name: matrix
  80. namespace: matrix
  81. spec:
  82. entryPoints:
  83. - websecure
  84. routes:
  85. - kind: Rule
  86. match: Host(`matrix.jibby.org`)
  87. services:
  88. - kind: Service
  89. name: matrix-service
  90. port: 8008