apiVersion: apps/v1
kind: Deployment
metadata:
  name: mcsd-mediator-deployment
  labels:
    package: hwf
spec:
  replicas: 1
  selector:
    matchLabels:
      component: mcsd-mediator
  template:
    metadata:
      labels:
        component: mcsd-mediator
    spec:
      initContainers:
        - name: check-openhim-status
          image: busybox:1.28
          command: ['sh', '-c', 'until telnet openhim-core-service 8082; do echo OpenHIM not running yet; sleep 10; done;']
      containers:
        - name: mcsd-mediator
          image: jembi/openhim-mediator-mapping:v1.0.0
          ports:
            - containerPort: 3003
          env:
            - name: OPENHIM_URL
              value: https://openhim-core-service:8082
            - name: OPENHIM_USERNAME
              value: root@openhim.org
            - name: OPENHIM_PASSWORD
              value: instant101
            - name: MONGO_URL
              value: mongodb://mongo-0.mongo-service,mongo-1.mongo-service,mongo-2.mongo-service/mapping-mediator?replicaSet=mongo-set
            - name: PARSER_LIMIT
              value: 10mb
