apiVersion: apps/v1
kind: Deployment
metadata:
  name: starling-ap-sitl
  labels:
    app: starling
    platform: sitl
spec:
  selector:
    matchLabels:
      app: starling-ap-sitl
  template:
    metadata:
      labels:
        app: starling
        firmware: ardupilot
        platform: sitl
    spec:
      containers:
      - name: starling-ardupilot-sitl
        image: uobflightlabstarling/starling-ardupilot-sitl
        imagePullPolicy: Always
        env:
        - name: SYSID
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        ports:
        - containerPort: 14553
          protocol: "UDP"
        - containerPort: 5760
        - containerPort: 5762
        - containerPort: 5763
      - name: starling-mavros
        image: uobflightlabstarling/starling-mavros:latest
        imagePullPolicy: Always
        env:
        - name: MAVROS_FCU_URL
          value: tcp://127.0.0.1:5762
        - name: MAVROS_TGT_FIRMWARE
          value: "apm"
        - name: MAVROS_TGT_SYSTEM
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        ports:
        - containerPort: 5762
      # - name: network-tools
      #   image: praqma/network-multitool
      nodeSelector:
        kubernetes.io/arch: "amd64"
