ntfy.yaml 1.9 KB

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