diff --git a/clusters/artemis/apps/kustomization.yaml b/clusters/artemis/apps/kustomization.yaml index 353ac83..bd583f0 100644 --- a/clusters/artemis/apps/kustomization.yaml +++ b/clusters/artemis/apps/kustomization.yaml @@ -13,3 +13,4 @@ resources: - pocket-id - vaultwarden - mailu + - ntfy diff --git a/clusters/artemis/apps/ntfy/app-project.yaml b/clusters/artemis/apps/ntfy/app-project.yaml new file mode 100644 index 0000000..ee8e899 --- /dev/null +++ b/clusters/artemis/apps/ntfy/app-project.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: ntfy +spec: + description: Notification server + sourceRepos: + - '*' + sourceNamespaces: + - '*' + destinations: + - namespace: 'ntfy' + server: '*' + clusterResourceWhitelist: + - group: '*' + kind: '*' diff --git a/clusters/artemis/apps/ntfy/application.yaml b/clusters/artemis/apps/ntfy/application.yaml new file mode 100644 index 0000000..4ce2810 --- /dev/null +++ b/clusters/artemis/apps/ntfy/application.yaml @@ -0,0 +1,24 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ntfy + namespace: ntfy + labels: + platform.dgse.cloud/cluster: artemis + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: ntfy + source: + repoURL: 'https://git.dgse.cloud/DGSE/kubernetes.git' + path: manifests/artemis/ntfy + targetRevision: main + destination: + namespace: ntfy + name: in-cluster + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + prune: true + selfHeal: true diff --git a/clusters/artemis/apps/ntfy/kustomization.yaml b/clusters/artemis/apps/ntfy/kustomization.yaml new file mode 100644 index 0000000..f9b2a4b --- /dev/null +++ b/clusters/artemis/apps/ntfy/kustomization.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - app-project.yaml + - application.yaml diff --git a/manifests/artemis/ntfy/configmap.yaml b/manifests/artemis/ntfy/configmap.yaml new file mode 100644 index 0000000..e254b41 --- /dev/null +++ b/manifests/artemis/ntfy/configmap.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: ntfy +data: + server.yml: | + # Template: https://github.com/binwiederhier/ntfy/blob/main/server/server.yml + base-url: https://notifications.dgse.cloud diff --git a/manifests/artemis/ntfy/deployment.yaml b/manifests/artemis/ntfy/deployment.yaml new file mode 100644 index 0000000..3797036 --- /dev/null +++ b/manifests/artemis/ntfy/deployment.yaml @@ -0,0 +1,33 @@ +--- +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/manifests/artemis/ntfy/ingress.yaml b/manifests/artemis/ntfy/ingress.yaml new file mode 100644 index 0000000..494bd79 --- /dev/null +++ b/manifests/artemis/ntfy/ingress.yaml @@ -0,0 +1,24 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt + labels: + name: ntfy +spec: + rules: + - host: notifications.dgse.cloud + http: + paths: + - backend: + service: + name: ntfy + port: + number: 80 + path: / + pathType: Prefix + tls: + - hosts: + - notifications.dgse.cloud + secretName: letsencrypt diff --git a/manifests/artemis/ntfy/service.yaml b/manifests/artemis/ntfy/service.yaml new file mode 100644 index 0000000..5f78072 --- /dev/null +++ b/manifests/artemis/ntfy/service.yaml @@ -0,0 +1,12 @@ +--- +# Basic service for port 80 +apiVersion: v1 +kind: Service +metadata: + name: ntfy +spec: + selector: + app: ntfy + ports: + - port: 80 + targetPort: 80