apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    component: uptime-kuma
  name: uptime-kuma
  namespace: uptime-kuma
spec:
  selector:
    matchLabels:
      component: uptime-kuma
  replicas: 1
  strategy:
    type: Recreate

  template:
    metadata:
      labels:
        component: uptime-kuma
    spec:
      containers:
        - name: app
          image: louislam/uptime-kuma:1.16.1
          ports:
            - containerPort: 3001
          volumeMounts:
            - mountPath: /app/data
              name: storage
          livenessProbe:
            exec:
              command:
                - node
                - extra/healthcheck.js
            initialDelaySeconds: 180
            periodSeconds: 60
            timeoutSeconds: 30
          readinessProbe:
            httpGet:
              path: /
              port: 3001
              scheme: HTTP
          resources:
            requests:
              memory: "256Mi"
              cpu: "500m"
            limits:
              memory: "512Mi"
              cpu: "1000m"
      volumes:
        - name: storage
          persistentVolumeClaim:
            claimName: pvc-uptime-kuma
