add uptime-kuma
This commit is contained in:
86
k8s/xiongxiao.me/apps/uptime-kuma/app.yml
Normal file
86
k8s/xiongxiao.me/apps/uptime-kuma/app.yml
Normal file
@@ -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
|
||||||
9
k8s/xiongxiao.me/apps/uptime-kuma/compose.yml
Normal file
9
k8s/xiongxiao.me/apps/uptime-kuma/compose.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
uptime-kuma:
|
||||||
|
image: louislam/uptime-kuma:2
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ./data:/app/data
|
||||||
|
ports:
|
||||||
|
# <Host Port>:<Container Port>
|
||||||
|
- "3001:3001"
|
||||||
Reference in New Issue
Block a user