apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  labels:
    service: ipfs
    version: 0.7.0
  name: ipfs
spec:
  strategy:
    type: Recreate
  replicas: 1
  selector:
    matchLabels:
      service: ipfs
  template:
    metadata:
      labels:
        service: ipfs
    spec:
      containers:
      - args:
        - daemon
        - --enable-gc
        - --migrate
        command:
        - ipfs
        image: ipfs/go-ipfs:v0.7.0
        imagePullPolicy: Always
        name: ipfs
        volumeMounts:
          - mountPath: /data/ipfs
            name: ipfs-data
        resources:
          requests:
            memory: "5Gi"
        ports:
          - name: swarm
            containerPort: 4001
          - name: api
            containerPort: 5001
          - name: web
            containerPort: 8080
          - name: swarm-ws
            containerPort: 8081
        readinessProbe:
          httpGet:
            port: 8080
            path: /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/quick-start
      restartPolicy: Always
      volumes:
        - name: ipfs-data
          gcePersistentDisk:
            pdName: ipfs-data
            fsType: ext4
