---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dmbc02
  labels:
    app: dmbc02
    dmbc: "true"
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: dmbc02
  strategy:
    type: Recreate
  template:
    metadata:
      name: dmbc02
      labels:
        app: dmbc02
        dmbc: "true"
    spec:
      containers:
      - name: dmarket-blockchain
        image: globalgames/dmarket-blockchain:latest
        imagePullPolicy: Always
        env:
          - name: RUST_LOG
            value: info
          - name: RUST_BACKTRACE
            value: "1"
          - name: POD_IP
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
        ports:
        - containerPort: 8000
          protocol: TCP
        volumeMounts:
        - mountPath: /src/app/var/keys
          name: dmbc02-keys
        - mountPath: /src/app/var/db
          name: dmbc02
        - mountPath: /src/app/etc
          name: dmbc02-config
      dnsPolicy: ClusterFirst
      imagePullSecrets:
      - name: dockerhub
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      volumes:
      - name: dmbc02
        persistentVolumeClaim:
          claimName: dmbc02
      - name: dmbc02-keys
        secret:
          defaultMode: 420
          secretName: dmbc02-keys
      - configMap:
          defaultMode: 420
          name: dmbc02-config
        name: dmbc02-config
          
