apiVersion: apps/v1
kind: Deployment
metadata:
  name: ros-demo-client-{{ .Values.robot.name }}
spec:
  replicas: 1
  selector:
    matchLabels:
      id: "{{ .Values.robot.name }}"
      app: ros-demo-client
  template:
    metadata:
      labels:
        id: "{{ .Values.robot.name }}"
        app: ros-demo-client
    spec:
      containers:
      - env:
        - name: ROS_MASTER_URI
          value: http://ros-master.app-ros-master.svc.cluster.local:11311
        - name: ROS_IP
          valueFrom:
            fieldRef:
              fieldPath: "status.podIP"
        image: ros:melodic
        name: ros-demo-client
        args:
        - /opt/ros/melodic/bin/rostopic
        - pub
        - -r
        - "10"
        - chatter
        - std_msgs/String
        - "hello world"
