From 477405d61f5f3920689db4cbfc3269e5805a8347 Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Thu, 31 Oct 2024 15:43:36 +0100 Subject: [PATCH] add uptime-kuma --- .../base/uptime-kuma-application.yaml | 20 +++++++++++++ argocd-applications/kustomization.yaml | 1 + uptime-kuma/base/uptime-kuma-deployment.yaml | 28 +++++++++++++++++++ uptime-kuma/base/uptime-kuma-ingress.yaml | 12 ++++++++ uptime-kuma/base/uptime-kuma-namespace.yaml | 4 +++ uptime-kuma/base/uptime-kuma-pvc.yaml | 11 ++++++++ uptime-kuma/base/uptime-kuma-svc.yaml | 11 ++++++++ uptime-kuma/kustomization.yaml | 11 ++++++++ 8 files changed, 98 insertions(+) create mode 100644 argocd-applications/base/uptime-kuma-application.yaml create mode 100644 uptime-kuma/base/uptime-kuma-deployment.yaml create mode 100644 uptime-kuma/base/uptime-kuma-ingress.yaml create mode 100644 uptime-kuma/base/uptime-kuma-namespace.yaml create mode 100644 uptime-kuma/base/uptime-kuma-pvc.yaml create mode 100644 uptime-kuma/base/uptime-kuma-svc.yaml create mode 100644 uptime-kuma/kustomization.yaml diff --git a/argocd-applications/base/uptime-kuma-application.yaml b/argocd-applications/base/uptime-kuma-application.yaml new file mode 100644 index 0000000..a46c3b9 --- /dev/null +++ b/argocd-applications/base/uptime-kuma-application.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argo-app-uptime-kuma + namespace: argocd +spec: + destination: + name: '' + namespace: default + server: https://kubernetes.default.svc + source: + path: uptime-kuma + repoURL: https://git.mziesel.nl/mans/argocd-test + targetRevision: HEAD + sources: [] + project: default + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/argocd-applications/kustomization.yaml b/argocd-applications/kustomization.yaml index 8abee65..4f3672f 100644 --- a/argocd-applications/kustomization.yaml +++ b/argocd-applications/kustomization.yaml @@ -17,3 +17,4 @@ resources: - ./base/cloudnative-pg-application.yaml - ./base/keycloak-application.yaml - ./base/mediaserver-application.yaml + - ./base/uptime-kuma-application.yaml diff --git a/uptime-kuma/base/uptime-kuma-deployment.yaml b/uptime-kuma/base/uptime-kuma-deployment.yaml new file mode 100644 index 0000000..ffc5a86 --- /dev/null +++ b/uptime-kuma/base/uptime-kuma-deployment.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: uptime-kuma + namespace: uptime-kuma +spec: + replicas: 1 + selector: + matchLabels: + app: uptime-kuma + template: + metadata: + labels: + app: uptime-kuma + spec: + volumes: + - name: uptime-kuma-data + persistentVolumeClaim: + claimName: uptime-kuma-data-pvc + containers: + - image: louislam/uptime-kuma:2.0.0-beta.0 + name: uptime-kuma + ports: + - name: web + containerPort: 3001 + volumeMounts: + - mountPath: /app/data + name: uptime-kuma-data diff --git a/uptime-kuma/base/uptime-kuma-ingress.yaml b/uptime-kuma/base/uptime-kuma-ingress.yaml new file mode 100644 index 0000000..7b6ddbe --- /dev/null +++ b/uptime-kuma/base/uptime-kuma-ingress.yaml @@ -0,0 +1,12 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: uptime-kuma-ingressroute +spec: + routes: + - match: Host(`uptime-kuma.k8s.mziesel.nl`) + kind: Rule + services: + - name: uptime-kuma + port: web + tls: {} diff --git a/uptime-kuma/base/uptime-kuma-namespace.yaml b/uptime-kuma/base/uptime-kuma-namespace.yaml new file mode 100644 index 0000000..92c7bb2 --- /dev/null +++ b/uptime-kuma/base/uptime-kuma-namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: uptime-kuma diff --git a/uptime-kuma/base/uptime-kuma-pvc.yaml b/uptime-kuma/base/uptime-kuma-pvc.yaml new file mode 100644 index 0000000..a4d91e9 --- /dev/null +++ b/uptime-kuma/base/uptime-kuma-pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: uptime-kuma-data-pvc +spec: + storageClassName: nfs-client + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi diff --git a/uptime-kuma/base/uptime-kuma-svc.yaml b/uptime-kuma/base/uptime-kuma-svc.yaml new file mode 100644 index 0000000..826c54e --- /dev/null +++ b/uptime-kuma/base/uptime-kuma-svc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: uptime-kuma +spec: + ports: + - name: web + port: 80 + targetPort: web + selector: + app: uptime-kuma diff --git a/uptime-kuma/kustomization.yaml b/uptime-kuma/kustomization.yaml new file mode 100644 index 0000000..e4dd8fc --- /dev/null +++ b/uptime-kuma/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: uptime-kuma + +resources: + - ./base/uptime-kuma-namespace.yaml + - ./base/uptime-kuma-pvc.yaml + - ./base/uptime-kuma-deployment.yaml + - ./base/uptime-kuma-svc.yaml + - ./base/uptime-kuma-ingress.yaml