Woojoong Kim | 676bbac | 2021-01-15 12:00:33 -0800 | [diff] [blame] | 1 | # Copyright 2021-present Open Networking Foundation |
| 2 | # |
Scott Baker | 4cad5ee | 2022-06-09 14:17:35 -0700 | [diff] [blame] | 3 | # SPDX-License-Identifier: Apache-2.0 |
Woojoong Kim | 676bbac | 2021-01-15 12:00:33 -0800 | [diff] [blame] | 4 | |
Woojoong Kim | 4f5cf18 | 2021-01-31 00:09:54 -0800 | [diff] [blame] | 5 | {{ tuple "ros-core" . | include "ros-core.service_account" }} |
Woojoong Kim | 676bbac | 2021-01-15 12:00:33 -0800 | [diff] [blame] | 6 | --- |
| 7 | apiVersion: apps/v1 |
| 8 | kind: StatefulSet |
| 9 | metadata: |
| 10 | name: ros-core |
| 11 | labels: |
| 12 | {{ tuple "ros-core" . | include "ros-core.metadata_labels" | indent 4 }} |
| 13 | spec: |
| 14 | replicas: 1 |
| 15 | serviceName: ros-core |
| 16 | selector: |
| 17 | matchLabels: |
| 18 | {{ tuple "ros-core" . | include "ros-core.metadata_labels" | indent 6 }} |
| 19 | template: |
| 20 | metadata: |
| 21 | labels: |
| 22 | {{ tuple "ros-core" . | include "ros-core.metadata_labels" | indent 8 }} |
| 23 | spec: |
Woojoong Kim | fccf090 | 2021-01-15 12:48:41 -0800 | [diff] [blame] | 24 | {{- if .Values.nodeSelector.enabled }} |
| 25 | nodeSelector: |
| 26 | {{ .Values.nodeSelector.rosCore.label }}: {{ .Values.nodeSelector.rosCore.value }} |
| 27 | {{- end }} |
Woojoong Kim | 4f5cf18 | 2021-01-31 00:09:54 -0800 | [diff] [blame] | 28 | serviceAccountName: ros-core |
Woojoong Kim | 0b46a41 | 2021-01-25 00:51:11 -0800 | [diff] [blame] | 29 | {{- if .Values.networks.hostNetwork }} |
| 30 | hostNetwork: true |
| 31 | dnsPolicy: None |
| 32 | dnsConfig: |
| 33 | nameservers: |
| 34 | - {{ .Values.coredns.service.clusterIP }} |
| 35 | {{- end }} |
Woojoong Kim | 676bbac | 2021-01-15 12:00:33 -0800 | [diff] [blame] | 36 | containers: |
| 37 | - name: ros-core |
| 38 | image: {{ .Values.images.tags.rosCore }} |
| 39 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 40 | securityContext: |
| 41 | privileged: true |
Woojoong Kim | 0b46a41 | 2021-01-25 00:51:11 -0800 | [diff] [blame] | 42 | stdin: true |
| 43 | tty: true |
Woojoong Kim | 676bbac | 2021-01-15 12:00:33 -0800 | [diff] [blame] | 44 | command: |
| 45 | - /root/run_roscore.sh |
| 46 | volumeMounts: |
| 47 | - name: ros-core |
| 48 | mountPath: /root/run_roscore.sh |
| 49 | subPath: run_roscore.sh |
Woojoong Kim | 4f5cf18 | 2021-01-31 00:09:54 -0800 | [diff] [blame] | 50 | - name: ros-core-launch |
| 51 | mountPath: /root/TrajBridge-PX4/src/bridge_px4/launch |
Woojoong Kim | 0b46a41 | 2021-01-25 00:51:11 -0800 | [diff] [blame] | 52 | - name: drone-net-listener |
| 53 | image: {{ .Values.images.tags.droneNetListener }} |
| 54 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 55 | stdin: true |
| 56 | tty: true |
| 57 | command: ["bash", "-xc"] |
| 58 | args: |
| 59 | - python /opt/net_listener.py |
| 60 | volumeMounts: |
| 61 | - name: ros-core |
| 62 | mountPath: /opt/net_listener.py |
| 63 | subPath: net_listener.py |
Woojoong Kim | 676bbac | 2021-01-15 12:00:33 -0800 | [diff] [blame] | 64 | volumes: |
| 65 | - name: ros-core |
| 66 | configMap: |
| 67 | name: ros-core |
| 68 | defaultMode: 493 |
Woojoong Kim | 4f5cf18 | 2021-01-31 00:09:54 -0800 | [diff] [blame] | 69 | - name: ros-core-launch |
| 70 | configMap: |
| 71 | name: ros-core-launch |
| 72 | defaultMode: 420 |