apiVersion: apps/v1
kind: Deployment
metadata:
  name: turtlebot3-bringup
  labels:
    app: turtlebot3-bringup
spec:
  replicas: 1
  selector:
    matchLabels:
      app: turtlebot3-bringup
  template:
    metadata:
      labels:
        app: turtlebot3-bringup
    spec:
      containers:
      - name: turtlebot3-bringup
        image: "${EXTERNAL_HOST_IPADDR}:5000/roboticbase/turtlebot3-bringup:0.2.0"
        imagePullPolicy: Always
        command:
        - "/opt/kube_entrypoint.sh"
        lifecycle:
          preStop:
            exec:
              command:
              - "/opt/pre_stop.sh"
        env:
        - name: ROS_HOSTNAME
          value: turtlebot3-bringup
        - name: ROS_MASTER_URI
          value: http://ros-master:11311
        volumeMounts:
        - mountPath: "/usr"
          name: usr
          readOnly: true
        - mountPath: "/lib"
          name: lib
          readOnly: true
        - mountPath: "/lib64"
          name: lib64
          readOnly: true
        - mountPath: "/etc/alternatives"
          name: etc-alternatives
          readOnly: true
        - mountPath: "/opt/ros"
          name: opt-ros
          readOnly: true
        - mountPath: "/opt/ros_ws/src/hls_lfcd_lds_driver"
          name: hls-lfcd-lds-driver
          readOnly: true
        - mountPath: "/opt/ros_ws/src/turtlebot3_msgs"
          name: turtlebot3-msgs
          readOnly: true
        - mountPath: "/opt/ros_ws/src/turtlebot3"
          name: turtlebot3
          readOnly: true
        - mountPath: "/dev/ttyACM0"
          name: dev-ttyacm0
        securityContext:
          privileged: true
      volumes:
      - name: usr
        hostPath:
          path: "/usr"
          type: Directory
      - name: lib
        hostPath:
          path: "/lib"
          type: Directory
      - name: lib64
        hostPath:
          path: "/lib64"
          type: Directory
      - name: etc-alternatives
        hostPath:
          path: "/etc/alternatives"
          type: Directory
      - name: opt-ros
        hostPath:
          path: "/opt/ros"
          type: Directory
      - name: hls-lfcd-lds-driver
        hostPath:
          path: "${TURTLEBOT3_WORKSPACE}/src/hls_lfcd_lds_driver"
          type: Directory
      - name: turtlebot3-msgs
        hostPath:
          path: "${TURTLEBOT3_WORKSPACE}/src/turtlebot3_msgs"
          type: Directory
      - name: turtlebot3
        hostPath:
          path: "${TURTLEBOT3_WORKSPACE}/src/turtlebot3"
          type: Directory
      - name: dev-ttyacm0
        hostPath:
          path: "/dev/ttyACM0"
          type: CharDevice
