blob: 289dad31c21d7c39e3d6f595eee9eab58ed6b23f [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
27 selector:
28 matchLabels:
Hyunsun Moon10152302019-10-24 20:23:35 -050029{{ tuple "ue" . | include "oaisim.metadata_labels" | indent 6 }}
Hyunsun Mooned19c092019-07-10 15:24:45 -060030 template:
31 metadata:
32 labels:
Hyunsun Moon10152302019-10-24 20:23:35 -050033{{ tuple "ue" . | include "oaisim.metadata_labels" | indent 8 }}
Hyunsun Mooned19c092019-07-10 15:24:45 -060034 spec:
Hyunsun Moon43eadcc2019-08-20 16:16:08 -060035 {{- if .Values.nodeSelectors.enabled }}
36 nodeSelector:
37 {{ .Values.nodeSelectors.ue.label }}: {{ .Values.nodeSelectors.ue.value }}
38 {{- end }}
Hyunsun Moon10152302019-10-24 20:23:35 -050039 serviceAccountName: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -060040 hostNetwork: true
41 initContainers:
42 - name: ue-dep-check
43 image: {{ .Values.images.tags.dep_check | quote }}
44 imagePullPolicy: {{ .Values.images.pullPolicy }}
45 securityContext:
46 allowPrivilegeEscalation: false
47 readOnlyRootFilesystem: false
48 runAsUser: 0
49 env:
50 - name: POD_NAME
51 valueFrom:
52 fieldRef:
53 apiVersion: v1
54 fieldPath: metadata.name
55 - name: NAMESPACE
56 valueFrom:
57 fieldRef:
58 apiVersion: v1
59 fieldPath: metadata.namespace
60 - name: PATH
61 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
62 - name: COMMAND
63 value: "echo done"
64 - name: DEPENDENCY_POD_JSON
Hyunsun Moon10152302019-10-24 20:23:35 -050065 value: '[{"labels": {"app": "enb"}, "requireSameNode": true}]'
66 - name: DEPENDENCY_JOBS
67 value: ue-setup-if
Hyunsun Mooned19c092019-07-10 15:24:45 -060068 command:
69 - kubernetes-entrypoint
70 volumeMounts:
71 []
72 - name: ue-gen-usim
73 image: {{ .Values.images.tags.ue | quote }}
74 imagePullPolicy: {{ .Values.images.pullPolicy }}
75 command:
76 - /opt/oaisim/ue/scripts/ue-gen-usim.sh
77 volumeMounts:
78 - name: script
79 mountPath: /opt/oaisim/ue/scripts/ue-gen-usim.sh
80 subPath: ue-gen-usim.sh
81 - name: config
82 mountPath: /opt/oaisim/ue/config
83 - name: pod-share
84 mountPath: /etc/oaisim/ue
85 - name: ue-init
86 image: {{ .Values.images.tags.ue | quote }}
87 imagePullPolicy: {{ .Values.images.pullPolicy }}
88 securityContext:
89 privileged: true
90 command:
91 - /opt/oaisim/ue/scripts/ue-init.sh
92 volumeMounts:
93 - name: script
94 mountPath: /opt/oaisim/ue/scripts/ue-init.sh
95 subPath: ue-init.sh
96 containers:
Hyunsun Moon10152302019-10-24 20:23:35 -050097 - name: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -060098 image: {{ .Values.images.tags.ue | quote }}
99 imagePullPolicy: {{ .Values.images.pullPolicy }}
100 securityContext:
101 privileged: true
102 command:
103 - /opt/oaisim/ue/scripts/ue-run.sh
104 - start
105 lifecycle:
106 preStop:
107 exec:
108 command:
109 - /opt/oaisim/enb/scripts/ue-run.sh
110 - stop
111 env:
112 - name: UE_LOCAL_IP
113 valueFrom:
114 fieldRef:
115 fieldPath: status.podIP
116 volumeMounts:
117 - name: script
118 mountPath: /opt/oaisim/ue/scripts/ue-run.sh
119 subPath: ue-run.sh
120 - name: config
121 mountPath: /opt/oaisim/ue/config
122 - name: pod-share
123 mountPath: /etc/oaisim/ue
124 volumes:
125 - name: config
126 configMap:
Hyunsun Moon10152302019-10-24 20:23:35 -0500127 name: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -0600128 defaultMode: 420
129 - name: script
130 configMap:
Hyunsun Moon10152302019-10-24 20:23:35 -0500131 name: ue
Hyunsun Mooned19c092019-07-10 15:24:45 -0600132 defaultMode: 493
133 - name: pod-share
134 emptyDir: {}