apiVersion: apps/v1
kind: Deployment
metadata:
  name: ros2-tensorflow
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ros2-tensorflow
  template:
    metadata:
      labels:
        app: ros2-tensorflow
    spec:
      containers:
      - image: naju1012/tensorflow-ros2:latest 
        command: ["/bin/bash", "-c"]
        args: ["cd tf_ws;ls;source /opt/ros/eloquent/setup.sh;colcon build;source install/local_setup.sh;ros2 run tf_classification_py server"]
        securityContext:
          privileged: true
        imagePullPolicy: IfNotPresent
        name: ros2-tensorflow
      imagePullSecrets:
      - name: docker-registry
      nodeSelector:
        location: cloud1
      restartPolicy: Always
      hostNetwork: true
