From 4bc004c53b41e20b5e5832b6ebb3e7ffc981bd82 Mon Sep 17 00:00:00 2001 From: abearixong Date: Wed, 14 Jan 2026 18:44:05 +0800 Subject: [PATCH] add uptime-kuma --- k8s/xiongxiao.me/apps/uptime-kuma/app.yml | 86 +++++++++++++++++++ k8s/xiongxiao.me/apps/uptime-kuma/compose.yml | 9 ++ 2 files changed, 95 insertions(+) create mode 100644 k8s/xiongxiao.me/apps/uptime-kuma/app.yml create mode 100644 k8s/xiongxiao.me/apps/uptime-kuma/compose.yml diff --git a/k8s/xiongxiao.me/apps/uptime-kuma/app.yml b/k8s/xiongxiao.me/apps/uptime-kuma/app.yml new file mode 100644 index 0000000..7055199 --- /dev/null +++ b/k8s/xiongxiao.me/apps/uptime-kuma/app.yml @@ -0,0 +1,86 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: uptime-kuma + labels: + app: uptime-kuma +spec: + replicas: 1 + selector: + matchLabels: + app: uptime-kuma + template: + metadata: + labels: + app: uptime-kuma + spec: + nodeSelector: + machine: "on" + containers: + - name: uptime-kuma + image: louislam/uptime-kuma:2 + ports: + - containerPort: 3001 + resources: + requests: + memory: "128Mi" + cpu: "100m" + limits: + memory: "512Mi" + cpu: "500m" + livenessProbe: + httpGet: + path: / + port: 3001 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + readinessProbe: + httpGet: + path: / + port: 3001 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 3 + volumeMounts: + - name: data-volume + mountPath: /app/data + volumes: + - name: data-volume + hostPath: + path: /opt/docker/uptime-kuma + type: DirectoryOrCreate +--- +apiVersion: v1 +kind: Service +metadata: + name: uptime-kuma + labels: + app: uptime-kuma +spec: + type: ClusterIP + ports: + - port: 3001 + targetPort: 3001 + protocol: TCP + name: http + selector: + app: uptime-kuma +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: uptime-kuma-https +spec: + entryPoints: + - websecure + routes: + - match: Host(`uptime.xiongxiao.me`) + kind: Rule + services: + - name: uptime-kuma + port: 3001 + tls: + certResolver: letsencrypt diff --git a/k8s/xiongxiao.me/apps/uptime-kuma/compose.yml b/k8s/xiongxiao.me/apps/uptime-kuma/compose.yml new file mode 100644 index 0000000..6bffe15 --- /dev/null +++ b/k8s/xiongxiao.me/apps/uptime-kuma/compose.yml @@ -0,0 +1,9 @@ +services: + uptime-kuma: + image: louislam/uptime-kuma:2 + restart: unless-stopped + volumes: + - ./data:/app/data + ports: + # : + - "3001:3001" \ No newline at end of file