diff --git a/apps/ntfy/deployment.yaml b/apps/ntfy/deployment.yaml new file mode 100644 index 0000000..04095f1 --- /dev/null +++ b/apps/ntfy/deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ntfy +spec: + selector: + matchLabels: + app: ntfy + template: + metadata: + labels: + app: ntfy + spec: + containers: + - name: ntfy + image: binwiederhier/ntfy + args: ["serve"] + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 80 + name: http + volumeMounts: + - name: config + mountPath: "/etc/ntfy" + readOnly: true + volumes: + - name: config + configMap: + name: ntfy diff --git a/apps/ntfy/ingress.yaml b/apps/ntfy/ingress.yaml new file mode 100644 index 0000000..659bf94 --- /dev/null +++ b/apps/ntfy/ingress.yaml @@ -0,0 +1,31 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: websocket +spec: + headers: + customRequestHeaders: + X-Forwarded-Proto: "https" + # enable websockets + Upgrade: "websocket" +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: ntfy-ingressroute + +spec: + entryPoints: + - websecure + routes: + - match: Host(`ntfy.kluster.moll.re`) + kind: Rule + services: + - name: immich-server + port: 80 + # passHostHeader: true + middlewares: + - name: websocket + tls: + certResolver: default-tls + \ No newline at end of file diff --git a/apps/ntfy/kustomization.yaml b/apps/ntfy/kustomization.yaml new file mode 100644 index 0000000..4f7b3fa --- /dev/null +++ b/apps/ntfy/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: ntfy + +resources: + - namespace.yaml + - deployment.yaml + - service.yaml + - ingress.yaml diff --git a/apps/ntfy/namespace.yaml b/apps/ntfy/namespace.yaml new file mode 100644 index 0000000..3900a62 --- /dev/null +++ b/apps/ntfy/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: placeholder \ No newline at end of file diff --git a/apps/ntfy/service.yaml b/apps/ntfy/service.yaml new file mode 100644 index 0000000..bad852e --- /dev/null +++ b/apps/ntfy/service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: ntfy +spec: + selector: + app: ntfy + ports: + - port: 80 + targetPort: 80 \ No newline at end of file diff --git a/kluster-deployments/kustomization.yaml b/kluster-deployments/kustomization.yaml index 94e6f76..1ece445 100644 --- a/kluster-deployments/kustomization.yaml +++ b/kluster-deployments/kustomization.yaml @@ -9,4 +9,5 @@ resources: - whoami/ - journal/ - immich/ - - homeassistant/ \ No newline at end of file + - homeassistant/ + - ntfy/ diff --git a/kluster-deployments/ntfy/application.yaml b/kluster-deployments/ntfy/application.yaml new file mode 100644 index 0000000..90c61d7 --- /dev/null +++ b/kluster-deployments/ntfy/application.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ntfy-application + namespace: argocd + +spec: + project: default + source: + repoURL: https://github.com/moll-re/k3s-infra.git + targetRevision: main + path: deployment/ + destination: + server: https://kubernetes.default.svc + namespace: ntfy + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/kluster-deployments/ntfy/kustomization.yaml b/kluster-deployments/ntfy/kustomization.yaml new file mode 100644 index 0000000..0b082ba --- /dev/null +++ b/kluster-deployments/ntfy/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- application.yaml \ No newline at end of file