apiVersion: apps/v1
kind: Deployment
metadata:
  name: robot-controller
spec:
  replicas: 3
  selector:
    matchLabels:
      app: robot-controller
  template:
    metadata:
      labels:
        app: robot-controller
    spec:
      containers:
      - name: robot-controller
        image: roboticbase/uoa-poc2-controller:0.1.0
        imagePullPolicy: Always
        env:
        - name: LOG_LEVEL
          value: "INFO"
        - name: LISTEN_PORT
          value: "3000"
        - name: TIMEZONE
          value: "Asia/Tokyo"
        - name: ORION_ENDPOINT
          value: "http://orion:1026"
        - name: FIWARE_SERVICE
          value: "${FIWARE_SERVICE}"
        - name: DELIVERY_ROBOT_SERVICEPATH
          value: "${DELIVERY_ROBOT_SERVICEPATH}"
        - name: DELIVERY_ROBOT_TYPE
          value: "${DELIVERY_ROBOT_TYPE}"
        - name: DELIVERY_ROBOT_LIST
          value: '["${DELIVERY_ROBOT_02}", "${DELIVERY_ROBOT_01}"]'
        - name: ROBOT_UI_SERVICEPATH
          value: "${ROBOT_UI_SERVICEPATH}"
        - name: ROBOT_UI_TYPE
          value: "${ROBOT_UI_TYPE}"
        - name: ID_TABLE
          value: '{"${DELIVERY_ROBOT_01}":"${ROBOT_UI_01}","${DELIVERY_ROBOT_02}":"${ROBOT_UI_02}"}'
        - name: CORS_ORIGINS
          value: "*"
        - name: TOKEN_SERVICEPATH
          value: "${TOKEN_SERVICEPATH}"
        - name: TOKEN_TYPE
          value: "${TOKEN_TYPE}"
        - name: MOVENEXT_WAIT_MSEC
          value: "500"
        - name: MOVENEXT_WAIT_MAX_NUM
          value: "40"
        - name: NOTIFICATION_THROTTLING_MSEC
          value: "250"
        - name: MONGODB_HOST
          value: "mongodb-client"
        - name: MONGODB_PORT
          value: "27017"
        - name: MONGODB_REPLICASET
          value: "rs0"
        - name: MONGODB_DB_NAME
          value: "robot_controller"
        - name: MONGODB_COLLECTION_NAME
          value: "delivery_robot_lock"
        ports:
          - name: r-controller
            containerPort: 3000
