blob: c1d2eddee127208432598ffe5edc91db2c7d97a5 [file] [log] [blame]
Hyunsun Mooned19c092019-07-10 15:24:45 -06001{{/*
2Copyright 2019-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/}}
16
Hyunsun Moon10152302019-10-24 20:23:35 -050017{{ tuple "ue" . | include "oaisim.service_account" }}
Hyunsun Mooned19c092019-07-10 15:24:45 -060018---
19apiVersion: apps/v1
20kind: StatefulSet
21metadata:
Hyunsun Moon10152302019-10-24 20:23:35 -050022 name: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -060023 labels:
Hyunsun Moon10152302019-10-24 20:23:35 -050024{{ tuple "ue" . | include "oaisim.metadata_labels" | indent 4 }}
Hyunsun Mooned19c092019-07-10 15:24:45 -060025spec:
26 replicas: 1
Scott Bakeracbd36c2020-09-29 23:35:08 -070027 serviceName: oaisim-ue
Hyunsun Mooned19c092019-07-10 15:24:45 -060028 selector:
29 matchLabels:
Hyunsun Moon10152302019-10-24 20:23:35 -050030{{ tuple "ue" . | include "oaisim.metadata_labels" | indent 6 }}
Hyunsun Mooned19c092019-07-10 15:24:45 -060031 template:
32 metadata:
33 labels:
Hyunsun Moon10152302019-10-24 20:23:35 -050034{{ tuple "ue" . | include "oaisim.metadata_labels" | indent 8 }}
Hyunsun Mooned19c092019-07-10 15:24:45 -060035 spec:
Hyunsun Moon43eadcc2019-08-20 16:16:08 -060036 {{- if .Values.nodeSelectors.enabled }}
37 nodeSelector:
38 {{ .Values.nodeSelectors.ue.label }}: {{ .Values.nodeSelectors.ue.value }}
39 {{- end }}
Hyunsun Moon10152302019-10-24 20:23:35 -050040 serviceAccountName: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -060041 hostNetwork: true
42 initContainers:
43 - name: ue-dep-check
44 image: {{ .Values.images.tags.dep_check | quote }}
45 imagePullPolicy: {{ .Values.images.pullPolicy }}
46 securityContext:
47 allowPrivilegeEscalation: false
48 readOnlyRootFilesystem: false
49 runAsUser: 0
50 env:
51 - name: POD_NAME
52 valueFrom:
53 fieldRef:
54 apiVersion: v1
55 fieldPath: metadata.name
56 - name: NAMESPACE
57 valueFrom:
58 fieldRef:
59 apiVersion: v1
60 fieldPath: metadata.namespace
61 - name: PATH
62 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
63 - name: COMMAND
64 value: "echo done"
65 - name: DEPENDENCY_POD_JSON
Hyunsun Moon10152302019-10-24 20:23:35 -050066 value: '[{"labels": {"app": "enb"}, "requireSameNode": true}]'
67 - name: DEPENDENCY_JOBS
68 value: ue-setup-if
Hyunsun Mooned19c092019-07-10 15:24:45 -060069 command:
70 - kubernetes-entrypoint
71 volumeMounts:
72 []
73 - name: ue-gen-usim
74 image: {{ .Values.images.tags.ue | quote }}
75 imagePullPolicy: {{ .Values.images.pullPolicy }}
76 command:
77 - /opt/oaisim/ue/scripts/ue-gen-usim.sh
78 volumeMounts:
79 - name: script
80 mountPath: /opt/oaisim/ue/scripts/ue-gen-usim.sh
81 subPath: ue-gen-usim.sh
82 - name: config
83 mountPath: /opt/oaisim/ue/config
84 - name: pod-share
85 mountPath: /etc/oaisim/ue
86 - name: ue-init
87 image: {{ .Values.images.tags.ue | quote }}
88 imagePullPolicy: {{ .Values.images.pullPolicy }}
89 securityContext:
90 privileged: true
91 command:
92 - /opt/oaisim/ue/scripts/ue-init.sh
93 volumeMounts:
94 - name: script
95 mountPath: /opt/oaisim/ue/scripts/ue-init.sh
96 subPath: ue-init.sh
97 containers:
Hyunsun Moon10152302019-10-24 20:23:35 -050098 - name: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -060099 image: {{ .Values.images.tags.ue | quote }}
100 imagePullPolicy: {{ .Values.images.pullPolicy }}
101 securityContext:
102 privileged: true
103 command:
104 - /opt/oaisim/ue/scripts/ue-run.sh
105 - start
106 lifecycle:
107 preStop:
108 exec:
109 command:
110 - /opt/oaisim/enb/scripts/ue-run.sh
111 - stop
112 env:
113 - name: UE_LOCAL_IP
114 valueFrom:
115 fieldRef:
116 fieldPath: status.podIP
117 volumeMounts:
118 - name: script
119 mountPath: /opt/oaisim/ue/scripts/ue-run.sh
120 subPath: ue-run.sh
121 - name: config
122 mountPath: /opt/oaisim/ue/config
123 - name: pod-share
124 mountPath: /etc/oaisim/ue
125 volumes:
126 - name: config
127 configMap:
Hyunsun Moon10152302019-10-24 20:23:35 -0500128 name: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -0600129 defaultMode: 420
130 - name: script
131 configMap:
Hyunsun Moon10152302019-10-24 20:23:35 -0500132 name: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -0600133 defaultMode: 493
134 - name: pod-share
135 emptyDir: {}