blob: 7470fb22c2a374d10098ada15036dd7db85a21e8 [file] [log] [blame]
Woojoong Kim4f5cf182021-01-31 00:09:54 -08001# Copyright 2021-present Open Networking Foundation
2#
Scott Baker4cad5ee2022-06-09 14:17:35 -07003# SPDX-License-Identifier: Apache-2.0
Woojoong Kim4f5cf182021-01-31 00:09:54 -08004
5{{ tuple "gcs" . | include "ros-core.service_account" }}
6---
7apiVersion: apps/v1
8kind: StatefulSet
9metadata:
10 name: gcs
11 labels:
12{{ tuple "gcs" . | include "ros-core.metadata_labels" | indent 4 }}
13spec:
14 replicas: 1
15 serviceName: gcs
16 selector:
17 matchLabels:
18{{ tuple "gcs" . | include "ros-core.metadata_labels" | indent 6 }}
19 template:
20 metadata:
21 labels:
22{{ tuple "gcs" . | include "ros-core.metadata_labels" | indent 8 }}
23 spec:
24 {{- if .Values.nodeSelector.enabled }}
25 nodeSelector:
26 {{ .Values.nodeSelector.gcs.label }}: {{ .Values.nodeSelector.gcs.value }}
27 {{- end }}
28 serviceAccountName: gcs
29 {{- if .Values.networks.hostNetwork }}
30 hostNetwork: true
31 dnsPolicy: None
32 dnsConfig:
33 nameservers:
34 - {{ .Values.coredns.service.clusterIP }}
35 {{- end }}
36 initContainers:
37 - name: gcs-dep-check
38 image: {{ .Values.images.tags.depCheck }}
39 imagePullPolicy: {{ .Values.images.pullPolicy }}
40 securityContext:
41 allowPrivilegeEscalation: false
42 readOnlyRootFilesystem: false
43 runAsUser: 0
44 env:
45 - name: POD_NAME
46 valueFrom:
47 fieldRef:
48 apiVersion: v1
49 fieldPath: metadata.name
50 - name: NAMESPACE
51 valueFrom:
52 fieldRef:
53 apiVersion: v1
54 fieldPath: metadata.namespace
55 - name: PATH
56 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
57 - name: COMMAND
58 value: "echo done"
59 - name: DEPENDENCY_POD_JSON
60 value: '[{"labels": {"app": "ros-core"}, "requireSameNode": false}]'
61 # add dependency job for make_certs.sh
62 command:
63 - kubernetes-entrypoint
64 volumeMounts:
65 []
66 containers:
67 - name: gcs
68 image: {{ .Values.images.tags.rosCore }}
69 imagePullPolicy: {{ .Values.images.pullPolicy }}
70 securityContext:
71 privileged: true
72 stdin: true
73 tty: true
74 command:
75 - /root/run_gcs.sh
76 volumeMounts:
77 - name: gcs
78 mountPath: /root/run_gcs.sh
79 subPath: run_gcs.sh
80 - name: gcs-launch
81 mountPath: /root/TrajBridge-PX4/src/bridge_px4/launch
82 - name: gcs-trajectory
83 mountPath: /root/TrajBridge-PX4/src/bridge_px4/trajectories
84 volumes:
85 - name: gcs
86 configMap:
87 name: gcs
88 defaultMode: 493
89 - name: gcs-launch
90 configMap:
91 name: gcs-launch
92 defaultMode: 420
93 - name: gcs-trajectory
94 configMap:
95 name: gcs-trajectory
96 defaultMode: 420