apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    component: uptime-kuma
  name: deployment
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
          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

      volumes:
        - name: storage
          persistentVolumeClaim:
            claimName: pvc
