
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "orderer1.dummy.com"
  namespace: dummy-com
  labels: 
    component: "orderer1.dummy.com"
spec:
  replicas: 1
  selector:
    matchLabels:
      component: "orderer1.dummy.com"
  template:
    metadata:
      labels:
        component: "orderer1.dummy.com"
        type: orderer
    spec:
      containers:
        - name: orderer1-dummy-com
          image: hyperledger/fabric-orderer:2.3.0
          imagePullPolicy: IfNotPresent
          workingDir: /opt/gopath/src/github.com/hyperledger/fabric
          env:
            - name: FABRIC_LOGGING_SPEC
              value: info
            - name: ORDERER_GENERAL_BOOTSTRAPMETHOD
              value: file
            - name: ORDERER_GENERAL_BOOTSTRAPFILE
              value: /var/hyperledger/orderer/orderer.genesis.block
            - name: ORDERER_GENERAL_LISTENADDRESS
              value: "0.0.0.0"
            - name: ORDERER_GENERAL_LISTENPORT
              value: "7050"
            - name: ORDERER_GENERAL_LOCALMSPID
              value: OrdererMSP
            - name: ORDERER_GENERAL_LOCALMSPDIR
              value: /var/hyperledger/orderer/msp
            - name: ORDERER_GENERAL_TLS_ENABLED
              value: "true"
            - name: ORDERER_GENERAL_TLS_ROOTCAS
              value: "[/var/hyperledger/orderer/tls/ca.crt]"
            - name: ORDERER_GENERAL_TLS_CERTIFICATE
              value: /var/hyperledger/orderer/tls/server.crt
            - name: ORDERER_GENERAL_TLS_PRIVATEKEY
              value: /var/hyperledger/orderer/tls/server.key
            - name: ORDERER_GENERAL_CLUSTER_ROOTCAS
              value: "[/var/hyperledger/orderer/tls/ca.crt]"
            - name: ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE
              value: /var/hyperledger/orderer/tls/server.crt
            - name: ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY
              value: /var/hyperledger/orderer/tls/server.key
          ports:
          - containerPort: 7050
          startupProbe:
            exec:
              command:
                - sh
                - -c
                - "nc -z -v 0.0.0.0 7050 > /dev/null 2>&1"
            initialDelaySeconds: 10
            failureThreshold: 5
            periodSeconds: 2
          volumeMounts:
            - name: hlf-artifacts
              mountPath: /var/hyperledger/orderer/orderer.genesis.block
              subPath: orderer.genesis.block
            - name: hlf-crypto-config
              mountPath: /var/hyperledger/orderer/msp
              subPath: ordererOrganizations/dummy.com/orderers/orderer1.dummy.com/msp
            - name: hlf-crypto-config
              mountPath: /var/hyperledger/orderer/tls
              subPath: ordererOrganizations/dummy.com/orderers/orderer1.dummy.com/tls
      volumes:
      - name: hlf-artifacts
        persistentVolumeClaim:
          claimName: hlf-artifacts
      - name: hlf-crypto-config
        persistentVolumeClaim:
          claimName: hlf-crypto-config
