apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: starling-simple-offboard-daemon
  labels:
    app: starling

spec:
  selector:
    matchLabels:
      name: starling-simple-offboard-daemon

  template:
    metadata:
      labels:
        name: starling-simple-offboard-daemon

    spec:
      nodeSelector:
        starling.dev/type: vehicle

      tolerations:
        - key: starling.dev/type
          operator: Equal
          value: vehicle
          effect: NoSchedule

      hostNetwork: true
      shareProcessNamespace: true

      containers:
        - name: starling-simple-offboard
          image: uobflightlabstarling/starling-simple-offboard:latest
          imagePullPolicy: Always
          volumeMounts:
          - mountPath: /etc/starling/vehicle.config
            name: vehicleconfig
            readOnly: true

      volumes:
        - name: vehicleconfig
          hostPath:
            path: /etc/starling/vehicle.config
            type: File
