ntfy.yaml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. spec:
  26. containers:
  27. - name: ntfy
  28. image: binwiederhier/ntfy:v2.11.0
  29. args: ["serve"]
  30. resources:
  31. limits:
  32. memory: "128Mi"
  33. cpu: "500m"
  34. ports:
  35. - containerPort: 80
  36. name: http
  37. volumeMounts:
  38. - name: config
  39. mountPath: /config
  40. - name: config-file
  41. mountPath: /etc/ntfy
  42. readOnly: true
  43. volumes:
  44. - name: config
  45. hostPath:
  46. path: /mnt/ntfy/config
  47. type: Directory
  48. - name: config-file
  49. configMap:
  50. name: ntfy
  51. ---
  52. apiVersion: v1
  53. kind: Service
  54. metadata:
  55. name: ntfy
  56. spec:
  57. selector:
  58. app: ntfy
  59. ports:
  60. - port: 80
  61. targetPort: 80
  62. ---
  63. apiVersion: cert-manager.io/v1
  64. kind: Certificate
  65. metadata:
  66. name: ntfy.bodicsek.host
  67. spec:
  68. secretName: ntfy.bodicsek.host
  69. issuerRef:
  70. name: letsencrypt-prod
  71. kind: ClusterIssuer
  72. dnsNames:
  73. - ntfy.bodicsek.host
  74. ---
  75. apiVersion: traefik.io/v1alpha1
  76. kind: IngressRoute
  77. metadata:
  78. name: ntfy
  79. namespace: default
  80. spec:
  81. entryPoints:
  82. - websecure
  83. routes:
  84. - kind: Rule
  85. match: Host(`ntfy.bodicsek.host`)
  86. services:
  87. - kind: Service
  88. name: ntfy
  89. namespace: default
  90. passHostHeader: true
  91. port: 80
  92. tls:
  93. secretName: ntfy.bodicsek.host