---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: dmbc-discovery
  name: dmbc-discovery
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: dmbc-discovery
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: dmbc-discovery
      name: dmbc-discovery
    spec:
      containers:
      - name: dmarket-blockchain
        image: globalgames/dmarket-blockchain:latest
        imagePullPolicy: Always
        command:
          - /src/app/dmbc-discovery
        ports:
        - containerPort: 3000
          protocol: TCP
        volumeMounts:
        - mountPath: /src/app/etc
          name: dmbc-discovery-cfg
        - mountPath: /src/app/var/peers
          name: peers
      dnsPolicy: ClusterFirst
      imagePullSecrets:
      - name: dockerhub
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          defaultMode: 420
          name: dmbc-discovery-cfg
        name: dmbc-discovery-cfg
      - emptyDir: {}
        name: peers
          
