From 4620265eade904e08ac45b524b035b4ff10951f4 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 27 Nov 2025 01:20:09 -0600 Subject: [PATCH] Add Uptime Kuma to Kubernetes --- manifests/kustomization.yaml | 1 + manifests/uptimekuma/chart.yaml | 33 +++++++++++++++++++++++++ manifests/uptimekuma/ingress.yaml | 15 +++++++++++ manifests/uptimekuma/kustomization.yaml | 7 ++++++ manifests/uptimekuma/namespace.yaml | 4 +++ manifests/uptimekuma/secrets.yaml | 27 ++++++++++++++++++++ modules/hm/gui.nix | 6 ++++- modules/hm/gui/bookmarks.nix | 4 +++ 8 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 manifests/uptimekuma/chart.yaml create mode 100644 manifests/uptimekuma/ingress.yaml create mode 100644 manifests/uptimekuma/kustomization.yaml create mode 100644 manifests/uptimekuma/namespace.yaml create mode 100644 manifests/uptimekuma/secrets.yaml diff --git a/manifests/kustomization.yaml b/manifests/kustomization.yaml index 2ed1e43..c73100e 100644 --- a/manifests/kustomization.yaml +++ b/manifests/kustomization.yaml @@ -12,3 +12,4 @@ resources: - monitoring - pinchflat - smokeping + - uptimekuma diff --git a/manifests/uptimekuma/chart.yaml b/manifests/uptimekuma/chart.yaml new file mode 100644 index 0000000..7c8553a --- /dev/null +++ b/manifests/uptimekuma/chart.yaml @@ -0,0 +1,33 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: uptime-kuma + namespace: uptime-kuma +spec: + interval: "24h" + url: "https://helm.irsigler.cloud" +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: uptime-kuma + namespace: uptime-kuma +spec: + interval: 10m + chart: + spec: + chart: uptime-kuma + sourceRef: + kind: HelmRepository + name: uptime-kuma + interval: "1h" + values: + volume: + storageClassName: longhorn-default + image: + tag: "2.0.2" + externalDatabase: + enabled: true + hostname: mariadb-cluster.mariadb-operator.svc.cluster.local + database: uptimekuma + existingSecret: uptimekuma-mariadb-password diff --git a/manifests/uptimekuma/ingress.yaml b/manifests/uptimekuma/ingress.yaml new file mode 100644 index 0000000..8827992 --- /dev/null +++ b/manifests/uptimekuma/ingress.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: uptime-kuma-tailscale + namespace: uptime-kuma +spec: + ingressClassName: tailscale + defaultBackend: + service: + name: uptime-kuma + port: + number: 3001 + tls: + - hosts: + - kuma diff --git a/manifests/uptimekuma/kustomization.yaml b/manifests/uptimekuma/kustomization.yaml new file mode 100644 index 0000000..8cc37e2 --- /dev/null +++ b/manifests/uptimekuma/kustomization.yaml @@ -0,0 +1,7 @@ +namespace: uptimekuma + +resources: + - namespace.yaml + - secrets.yaml + - chart.yaml + - ingress.yaml diff --git a/manifests/uptimekuma/namespace.yaml b/manifests/uptimekuma/namespace.yaml new file mode 100644 index 0000000..a9eb9f7 --- /dev/null +++ b/manifests/uptimekuma/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: uptimekuma diff --git a/manifests/uptimekuma/secrets.yaml b/manifests/uptimekuma/secrets.yaml new file mode 100644 index 0000000..f0b604a --- /dev/null +++ b/manifests/uptimekuma/secrets.yaml @@ -0,0 +1,27 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: uptimekuma-mariadb-password +spec: + target: + name: uptimekuma-mariadb-password + deletionPolicy: Delete + template: + type: kubernetes.io/basic-auth + data: + username: |- + {{ .username }} + password: |- + {{ .password }} + secretStoreRef: + name: bitwarden-login + kind: ClusterSecretStore + data: + - secretKey: username + remoteRef: + key: 4df95656-9f9c-4916-8e34-b3a200376365 + property: username + - secretKey: password + remoteRef: + key: 4df95656-9f9c-4916-8e34-b3a200376365 + property: password diff --git a/modules/hm/gui.nix b/modules/hm/gui.nix index a8e8bc1..3286fcc 100644 --- a/modules/hm/gui.nix +++ b/modules/hm/gui.nix @@ -150,7 +150,11 @@ in "app.update.auto" = false; "browser.ctrlTab.sortByRecentlyUsed" = true; "browser.startup.page" = 3; - "browser.startup.homepage" = "https://thehellings.com"; + "browser.startup.homepage" = + if pkgs.stdenv.hostPlatform.isDarwin then + "https://thehellings.com" + else + "https://kuma.shire-zebra.ts.net/"; "doh-rollout.doorhanger-decision" = "UIDisabled"; "doh-rollout.doneFirstRun" = true; "signon.rememberSignons" = false; diff --git a/modules/hm/gui/bookmarks.nix b/modules/hm/gui/bookmarks.nix index 6e5bd09..bfa2553 100644 --- a/modules/hm/gui/bookmarks.nix +++ b/modules/hm/gui/bookmarks.nix @@ -253,6 +253,10 @@ name = "Smokeping"; url = "https://ping.shire-zebra.ts.net/smokeping/smokeping.cgi"; } + { + name = "Uptime Kuma"; + url = "https://kuma.shire-zebra.ts.net"; + } ]; } {