blob: 28cb41af7b4c903d16379dabd91f289ee0cfce3a [file] [log] [blame]
Woojoong Kim676bbac2021-01-15 12:00:33 -08001# Copyright 2021-present Open Networking Foundation
2#
3# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5---
6apiVersion: apps/v1
7kind: StatefulSet
8metadata:
9 name: ros-core
10 labels:
11{{ tuple "ros-core" . | include "ros-core.metadata_labels" | indent 4 }}
12spec:
13 replicas: 1
14 serviceName: ros-core
15 selector:
16 matchLabels:
17{{ tuple "ros-core" . | include "ros-core.metadata_labels" | indent 6 }}
18 template:
19 metadata:
20 labels:
21{{ tuple "ros-core" . | include "ros-core.metadata_labels" | indent 8 }}
22 spec:
Woojoong Kimfccf0902021-01-15 12:48:41 -080023 {{- if .Values.nodeSelector.enabled }}
24 nodeSelector:
25 {{ .Values.nodeSelector.rosCore.label }}: {{ .Values.nodeSelector.rosCore.value }}
26 {{- end }}
Woojoong Kim0b46a412021-01-25 00:51:11 -080027 {{- if .Values.networks.hostNetwork }}
28 hostNetwork: true
29 dnsPolicy: None
30 dnsConfig:
31 nameservers:
32 - {{ .Values.coredns.service.clusterIP }}
33 {{- end }}
Woojoong Kim676bbac2021-01-15 12:00:33 -080034 containers:
35 - name: ros-core
36 image: {{ .Values.images.tags.rosCore }}
37 imagePullPolicy: {{ .Values.images.pullPolicy }}
38 securityContext:
39 privileged: true
Woojoong Kim0b46a412021-01-25 00:51:11 -080040 stdin: true
41 tty: true
Woojoong Kim676bbac2021-01-15 12:00:33 -080042 command:
43 - /root/run_roscore.sh
44 volumeMounts:
45 - name: ros-core
46 mountPath: /root/run_roscore.sh
47 subPath: run_roscore.sh
Woojoong Kim0b46a412021-01-25 00:51:11 -080048 - name: drone-net-listener
49 image: {{ .Values.images.tags.droneNetListener }}
50 imagePullPolicy: {{ .Values.images.pullPolicy }}
51 stdin: true
52 tty: true
53 command: ["bash", "-xc"]
54 args:
55 - python /opt/net_listener.py
56 volumeMounts:
57 - name: ros-core
58 mountPath: /opt/net_listener.py
59 subPath: net_listener.py
Woojoong Kim676bbac2021-01-15 12:00:33 -080060 volumes:
61 - name: ros-core
62 configMap:
63 name: ros-core
64 defaultMode: 493