diff --git a/ntfy/ntfy.yaml b/ntfy/ntfy.yaml new file mode 100644 index 0000000..9c484fe --- /dev/null +++ b/ntfy/ntfy.yaml @@ -0,0 +1,123 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: ntfy + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: ntfy + namespace: ntfy + labels: + app.kubernetes.io/name: ntfy + app.kubernetes.io/component: ntfy + app.kubernetes.io/instance: ntfy + app.kubernetes.io/part-of: ntfy +data: + server.yml: |+ + base-url: https://ntfy.pyrocufflink.net + behind-proxy: true + listen-http: '[::]:2586' + +--- +apiVersion: v1 +kind: Service +metadata: + name: ntfy + namespace: ntfy + labels: + app.kubernetes.io/name: ntfy + app.kubernetes.io/component: ntfy + app.kubernetes.io/instance: ntfy + app.kubernetes.io/part-of: ntfy +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: ntfy + app.kubernetes.io/component: ntfy + ports: + - name: http + port: 2586 + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ntfy + namespace: ntfy + labels: + app.kubernetes.io/name: ntfy + app.kubernetes.io/component: ntfy + app.kubernetes.io/instance: ntfy + app.kubernetes.io/part-of: ntfy +spec: + selector: + matchLabels: + app.kubernetes.io/name: ntfy + app.kubernetes.io/component: ntfy + app.kubernetes.io/instance: ntfy + app.kubernetes.io/part-of: ntfy + template: + metadata: + labels: + app.kubernetes.io/name: ntfy + app.kubernetes.io/component: ntfy + app.kubernetes.io/instance: ntfy + app.kubernetes.io/part-of: ntfy + spec: + containers: + - name: ntfy + image: docker.io/binwiederhier/ntfy:v1.29.1 + args: + - serve + ports: + - containerPort: 2586 + name: http + readinessProbe: + failureThreshold: 3 + httpGet: + path: /config.js + port: 2586 + initialDelaySeconds: 1 + periodSeconds: 60 + successThreshold: 1 + timeoutSeconds: 1 + securityContext: + runAsUser: 1000 + volumeMounts: + - name: config + mountPath: /etc/ntfy + readOnly: true + volumes: + - name: config + configMap: + name: ntfy + +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: ntfy + namespace: ntfy + labels: + app.kubernetes.io/name: ntfy + app.kubernetes.io/component: ntfy + app.kubernetes.io/instance: ntfy + app.kubernetes.io/part-of: ntfy +spec: + ingressClassName: nginx + rules: + - host: ntfy.pyrocufflink.blue + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: ntfy + port: + name: http + tls: + - hosts: + - ntfy.pyrocufflink.blue