---
kind: Deployment
apiVersion: apps/v1
metadata:
  namespace: default
  name: miniflux
  labels:
    app: miniflux

spec:
  replicas: 1
  selector:
    matchLabels:
      app: miniflux
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: miniflux
        version: v2.0.33
    spec:
      # nodeSelector:
      #   kubernetes.io/arch: arm
      containers:
        - env:
          - name: DATABASE_URL
            valueFrom:
              secretKeyRef:
                name: miniflux-secret
                key: DATABASE_URL
          # (60/5) * 30 = 360 feeds every hour
          - name: POLLING_FREQUENCY
            value: "5"
          - name: BATCH_SIZE
            value: "30"
          - name: RUN_MIGRATIONS
            value: "1"
          # - name: DEBUG
          #   value: "1"
          # - name: LOG_DATE_TIME
          #   value: "1"
          name: miniflux
          image: miniflux/miniflux:2.0.33
          ports:
            - containerPort: 8080
              name: miniflux-http
          livenessProbe:
            httpGet:
              path: /healthcheck
              port: miniflux-http
            initialDelaySeconds: 20
            periodSeconds: 10
      restartPolicy: Always
