apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: cryptpad
  name: cryptpad
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: cryptpad
  template:
    metadata:
      labels:
        app.kubernetes.io/name: cryptpad
    spec:
      containers:
      - image: cryptpad/cryptpad:version-5.5.0
        command:
        - /usr/local/bin/npm
        - start
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 5
          initialDelaySeconds: 30
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: http
          timeoutSeconds: 10
        name: cryptpad
        resources:
          requests:
            cpu: 25m
            memory: 587804717
        ports:
        - containerPort: 3000
          name: http
          protocol: TCP
        - containerPort: 3001
          name: http-safe
          protocol: TCP
        readinessProbe:
          failureThreshold: 5
          initialDelaySeconds: 30
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: http
          timeoutSeconds: 10
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /cryptpad/blob
          name: blob
        - mountPath: /cryptpad/block
          name: block
        - mountPath: /cryptpad/config
          name: config
        - mountPath: /cryptpad/customize
          name: customize
        - mountPath: /cryptpad/data
          name: data
        - mountPath: /cryptpad/datasource
          name: datasource
        - mountPath: /cryptpad/datastore
          name: datastore
      volumes:
      - name: blob
        persistentVolumeClaim:
          claimName: cryptpad-blob
      - name: block
        persistentVolumeClaim:
          claimName: cryptpad-block
      - name: config
        persistentVolumeClaim:
          claimName: cryptpad-config
      - name: customize
        persistentVolumeClaim:
          claimName: cryptpad-customize
      - name: data
        persistentVolumeClaim:
          claimName: cryptpad-data
      - name: datasource
        persistentVolumeClaim:
          claimName: cryptpad-datasource
      - name: datastore
        persistentVolumeClaim:
          claimName: cryptpad-datastore