---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: filestash
  labels:
    app: filestash
spec:
  replicas: 1
  selector:
    matchLabels:
      app: filestash
  template:
    metadata:
      labels:
        app: filestash
    spec:
      securityContext:
        fsGroup: 50
      containers:
      - name: filestash
        image: machines/filestash:latest
        imagePullPolicy: IfNotPresent
        ports:
        - name: http
          containerPort: 8334
          protocol: TCP
        livenessProbe:
          httpGet:
            path: /about
            port: 8334
          initialDelaySeconds: 120
        readinessProbe:
          httpGet:
            path: /about
            port: 8334
          initialDelaySeconds: 30
        env:
        - name: CMD_IMAGE_UPLOAD_TYPE
          value: filesystem

        volumeMounts:
        - name: data
          mountPath: "/app/data/state"
        resources:
          {}

      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: filestash

