blob: 770d0305bb97d9839d9fec08c61991de36b9f2f8 [file] [log] [blame]
Woojoong Kim676bbac2021-01-15 12:00:33 -08001# Copyright 2021-present Open Networking Foundation
2#
Scott Baker4cad5ee2022-06-09 14:17:35 -07003# SPDX-License-Identifier: Apache-2.0
Woojoong Kim676bbac2021-01-15 12:00:33 -08004
Woojoong Kim4f5cf182021-01-31 00:09:54 -08005{{ tuple "ros-core" . | include "ros-core.service_account" }}
Woojoong Kim676bbac2021-01-15 12:00:33 -08006---
7apiVersion: apps/v1
8kind: StatefulSet
9metadata:
10 name: ros-core
11 labels:
12{{ tuple "ros-core" . | include "ros-core.metadata_labels" | indent 4 }}
13spec:
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 Kimfccf0902021-01-15 12:48:41 -080024 {{- if .Values.nodeSelector.enabled }}
25 nodeSelector:
26 {{ .Values.nodeSelector.rosCore.label }}: {{ .Values.nodeSelector.rosCore.value }}
27 {{- end }}
Woojoong Kim4f5cf182021-01-31 00:09:54 -080028 serviceAccountName: ros-core
Woojoong Kim0b46a412021-01-25 00:51:11 -080029 {{- if .Values.networks.hostNetwork }}
30 hostNetwork: true
31 dnsPolicy: None
32 dnsConfig:
33 nameservers:
34 - {{ .Values.coredns.service.clusterIP }}
35 {{- end }}
Woojoong Kim676bbac2021-01-15 12:00:33 -080036 containers:
37 - name: ros-core
38 image: {{ .Values.images.tags.rosCore }}
39 imagePullPolicy: {{ .Values.images.pullPolicy }}
40 securityContext:
41 privileged: true
Woojoong Kim0b46a412021-01-25 00:51:11 -080042 stdin: true
43 tty: true
Woojoong Kim676bbac2021-01-15 12:00:33 -080044 command:
45 - /root/run_roscore.sh
46 volumeMounts:
47 - name: ros-core
48 mountPath: /root/run_roscore.sh
49 subPath: run_roscore.sh
Woojoong Kim4f5cf182021-01-31 00:09:54 -080050 - name: ros-core-launch
51 mountPath: /root/TrajBridge-PX4/src/bridge_px4/launch
Woojoong Kim0b46a412021-01-25 00:51:11 -080052 - 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 Kim676bbac2021-01-15 12:00:33 -080064 volumes:
65 - name: ros-core
66 configMap:
67 name: ros-core
68 defaultMode: 493
Woojoong Kim4f5cf182021-01-31 00:09:54 -080069 - name: ros-core-launch
70 configMap:
71 name: ros-core-launch
72 defaultMode: 420