feat: uptime-kuma

This commit is contained in:
auricom
2021-07-15 14:30:20 +02:00
parent cc99a7dcb1
commit 2e17aaf238
4 changed files with 112 additions and 0 deletions

View File

@@ -7,3 +7,4 @@ resources:
- kube-prometheus-stack
- loki-stack
- thanos
- uptime-kuma

View File

@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- statefulset.yaml
- volume.yaml

View File

@@ -0,0 +1,91 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: uptime-kuma
namespace: monitoring
labels:
app.kubernetes.io/instance: uptime-kuma
app.kubernetes.io/name: uptime-kuma
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: uptime-kuma
app.kubernetes.io/name: uptime-kuma
updateStrategy:
type: RollingUpdate
serviceName: uptime-kuma
strategy:
template:
metadata:
labels:
app.kubernetes.io/instance: uptime-kuma
app.kubernetes.io/name: uptime-kuma
spec:
containers:
- image: louislam/uptime-kuma:1.0.4
name: uptime-kuma
ports:
- containerPort: 3001
name: http
volumeMounts:
- name: config
mountPath: /app/data
subPath: claude
volumes:
- name: config
persistentVolumeClaim:
claimName: uptime-kuma-config
dnsConfig:
options:
- name: ndots
value: "1"
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/probe: "true"
prometheus.io/protocol: tcp
labels:
app.kubernetes.io/instance: uptime-kuma
app.kubernetes.io/name: uptime-kuma
name: uptime-kuma
namespace: monitoring
spec:
ports:
- name: http
port: 3001
protocol: TCP
targetPort: 3001
selector:
app.kubernetes.io/instance: uptime-kuma
app.kubernetes.io/name: uptime-kuma
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
labels:
app.kubernetes.io/instance: uptime-kuma
app.kubernetes.io/name: uptime-kuma
name: uptime-kuma
namespace: monitoring
spec:
rules:
- host: uptime-kuma.${SECRET_CLUSTER_DOMAIN}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: uptime-kuma
port:
number: 3001
tls:
- hosts:
- uptime-kuma.${SECRET_CLUSTER_DOMAIN}

View File

@@ -0,0 +1,15 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: uptime-kuma-config
namespace: monitoring
labels:
kasten-io-snapshots: "enable"
spec:
accessModes:
- ReadWriteOnce
storageClassName: rook-ceph-block
resources:
requests:
storage: 1Gi