mirror of
https://github.com/michaelthomson0797/fleet-infra.git
synced 2026-02-04 21:09:58 +00:00
ntfy
This commit is contained in:
47
apps/ntfy/deployment.yaml
Normal file
47
apps/ntfy/deployment.yaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ntfy
|
||||||
|
namespace: ntfy
|
||||||
|
labels:
|
||||||
|
app: ntfy
|
||||||
|
spec:
|
||||||
|
revisionHistoryLimit: 1
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ntfy
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ntfy
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: ntfy
|
||||||
|
image: binwiederhier/ntfy:v1.28.0
|
||||||
|
args: ["serve"]
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: America/Toronto
|
||||||
|
- name: NTFY_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: NTFY_LOG_LEVEL
|
||||||
|
value: INFO
|
||||||
|
- name: NTFY_BASE_URL
|
||||||
|
value: https://ntfy.michaelthomson.dev
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /etc/ntfy
|
||||||
|
subPath: server.yml
|
||||||
|
name: config-volume
|
||||||
|
- mountPath: /var/cache/ntfy
|
||||||
|
name: cache-volume
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: server-config
|
||||||
|
- name: cache-volume
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pvc
|
||||||
15
apps/ntfy/dns-endpoint.yaml
Normal file
15
apps/ntfy/dns-endpoint.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: externaldns.k8s.io/v1alpha1
|
||||||
|
kind: DNSEndpoint
|
||||||
|
metadata:
|
||||||
|
name: ntfy.michaelthomson.dev
|
||||||
|
namespace: ntfy
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- dnsName: ntfy.michaelthomson.dev
|
||||||
|
recordTTL: 180
|
||||||
|
recordType: CNAME
|
||||||
|
targets:
|
||||||
|
- michaelthomson.ddns.net
|
||||||
|
providerSpecific:
|
||||||
|
- name: external-dns.alpha.kubernetes.io/cloudflare-proxied
|
||||||
|
value: "true"
|
||||||
24
apps/ntfy/ingress.yaml
Normal file
24
apps/ntfy/ingress.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: ntfy
|
||||||
|
namespace: ntfy
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: ntfy.michaelthomson.dev
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: Prefix
|
||||||
|
path: /
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: service
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- ntfy.michaelthomson.dev
|
||||||
|
secretName: letsencrypt-wildcard-cert-michaelthomson.dev
|
||||||
12
apps/ntfy/kustomization.yaml
Normal file
12
apps/ntfy/kustomization.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- pvc.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
- dns-endpoint.yaml
|
||||||
|
configMapGenerator:
|
||||||
|
- name: server-config
|
||||||
|
files:
|
||||||
|
- server-config.yaml
|
||||||
4
apps/ntfy/namespace.yaml
Normal file
4
apps/ntfy/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: ntfy
|
||||||
12
apps/ntfy/pvc.yaml
Normal file
12
apps/ntfy/pvc.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc
|
||||||
|
namespace: ntfy
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
2
apps/ntfy/server-config.yaml
Normal file
2
apps/ntfy/server-config.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
cache-file: "/var/cache/ntfy/cache.db"
|
||||||
|
attachment-cache-dir: "/var/cache/ntfy/attachments"
|
||||||
14
apps/ntfy/service.yaml
Normal file
14
apps/ntfy/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service
|
||||||
|
namespace: ntfy
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: ntfy
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
15
bootstrap/apps/kustomization-ntfy.yaml
Normal file
15
bootstrap/apps/kustomization-ntfy.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: ntfy
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 15m
|
||||||
|
path: ./apps/ntfy
|
||||||
|
prune: false # remove any elements later removed from the above path
|
||||||
|
wait: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: flux-system
|
||||||
|
dependsOn:
|
||||||
|
- name: infra-configs
|
||||||
Reference in New Issue
Block a user