ntfy.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: ntfy
  5. data:
  6. server.yml: |
  7. # Template: https://github.com/binwiederhier/ntfy/blob/main/server/server.yml
  8. base-url: https://ntfy.bodicsek.host
  9. behind-proxy: true
  10. auth-file: /config/user.db
  11. auth-default-access: deny-all
  12. cache-file: /config/cache.db
  13. cache-duration: 168h
  14. ---
  15. apiVersion: apps/v1
  16. kind: Deployment
  17. metadata:
  18. name: ntfy
  19. spec:
  20. selector:
  21. matchLabels:
  22. app: ntfy
  23. template:
  24. metadata:
  25. labels:
  26. app: ntfy
  27. annotations:
  28. diun.enable: "true"
  29. diun.include_tags: '^v\d+\.\d+\.\d+$'
  30. spec:
  31. containers:
  32. - name: ntfy
  33. image: binwiederhier/ntfy:v2.12.0
  34. imagePullPolicy: IfNotPresent
  35. args: ["serve"]
  36. resources:
  37. limits:
  38. memory: "128Mi"
  39. cpu: "500m"
  40. ports:
  41. - containerPort: 80
  42. name: http
  43. volumeMounts:
  44. - name: config
  45. mountPath: /config
  46. - name: config-file
  47. mountPath: /etc/ntfy
  48. readOnly: true
  49. volumes:
  50. - name: config
  51. hostPath:
  52. path: /mnt/ntfy/config
  53. type: Directory
  54. - name: config-file
  55. configMap:
  56. name: ntfy
  57. ---
  58. apiVersion: v1
  59. kind: Service
  60. metadata:
  61. name: ntfy
  62. spec:
  63. selector:
  64. app: ntfy
  65. ports:
  66. - port: 80
  67. targetPort: 80
  68. ---
  69. apiVersion: cert-manager.io/v1
  70. kind: Certificate
  71. metadata:
  72. name: ntfy.bodicsek.host
  73. spec:
  74. secretName: ntfy.bodicsek.host
  75. issuerRef:
  76. name: letsencrypt-prod
  77. kind: ClusterIssuer
  78. dnsNames:
  79. - ntfy.bodicsek.host
  80. ---
  81. apiVersion: traefik.io/v1alpha1
  82. kind: IngressRoute
  83. metadata:
  84. name: ntfy
  85. namespace: default
  86. spec:
  87. entryPoints:
  88. - websecure
  89. routes:
  90. - kind: Rule
  91. match: Host(`ntfy.bodicsek.host`)
  92. services:
  93. - kind: Service
  94. name: ntfy
  95. namespace: default
  96. passHostHeader: true
  97. port: 80
  98. tls:
  99. secretName: ntfy.bodicsek.host