matrix.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.55.2
  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