ntfy.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: ntfy
  6. ---
  7. apiVersion: v1
  8. kind: ConfigMap
  9. metadata:
  10. name: ntfy
  11. namespace: ntfy
  12. data:
  13. server.yml: |
  14. # Template: https://github.com/binwiederhier/ntfy/blob/main/server/server.yml
  15. base-url: https://ntfy.jibby.org
  16. auth-file: "/ntfy/user.db"
  17. auth-default-access: "deny-all"
  18. behind-proxy: true
  19. enable-metrics: true
  20. ---
  21. apiVersion: apps/v1
  22. kind: Deployment
  23. metadata:
  24. name: ntfy
  25. namespace: ntfy
  26. annotations:
  27. prometheus.io/path: /metrics
  28. prometheus.io/port: "80"
  29. prometheus.io/scrape: "true"
  30. spec:
  31. strategy:
  32. type: Recreate
  33. selector:
  34. matchLabels:
  35. app: ntfy
  36. template:
  37. metadata:
  38. labels:
  39. app: ntfy
  40. spec:
  41. containers:
  42. - name: ntfy
  43. image: binwiederhier/ntfy:v2.7.0
  44. args: ["serve"]
  45. ports:
  46. - containerPort: 80
  47. name: http
  48. volumeMounts:
  49. - name: config
  50. mountPath: "/etc/ntfy"
  51. readOnly: true
  52. - name: data
  53. mountPath: "/ntfy"
  54. livenessProbe:
  55. httpGet:
  56. path: /v1/health
  57. port: 80
  58. failureThreshold: 10
  59. initialDelaySeconds: 30
  60. periodSeconds: 30
  61. timeoutSeconds: 10
  62. volumes:
  63. - name: config
  64. configMap:
  65. name: ntfy
  66. - name: data
  67. persistentVolumeClaim:
  68. claimName: ntfy-pvc
  69. ---
  70. # Basic service for port 80
  71. apiVersion: v1
  72. kind: Service
  73. metadata:
  74. name: ntfy-service
  75. namespace: ntfy
  76. labels:
  77. app: ntfy
  78. spec:
  79. selector:
  80. app: ntfy
  81. ports:
  82. - port: 80
  83. targetPort: 80
  84. name: http