blob: f478cb8865fbd955cb820de72cd13a60c8ab8693 [file] [log] [blame]
Hyunsun Moon06f98552019-08-15 13:44:47 -06001{{/*
2Copyright 2019-present Open Networking Foundation
Hyunsun Moon636e17d2019-07-03 12:52:15 -05003
Hyunsun Moon06f98552019-08-15 13:44:47 -06004Licensed 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
Hyunsun Moon636e17d2019-07-03 12:52:15 -05007
Hyunsun Moon06f98552019-08-15 13:44:47 -06008http://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 Moon16d70922019-08-25 04:57:25 -050017{{ tuple "mme" . | include "omec-control-plane.service_account" }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050018---
19apiVersion: apps/v1
20kind: StatefulSet
21metadata:
Hyunsun Moon06f98552019-08-15 13:44:47 -060022 name: mme
Hyunsun Moon636e17d2019-07-03 12:52:15 -050023 labels:
Hyunsun Moon7a007bb2019-08-19 16:41:36 -060024{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050025spec:
26 replicas: 1
27 selector:
28 matchLabels:
Hyunsun Moon7a007bb2019-08-19 16:41:36 -060029{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 6 }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -050030 serviceName: mme
Hyunsun Moon636e17d2019-07-03 12:52:15 -050031 template:
32 metadata:
33 labels:
Hyunsun Moon7a007bb2019-08-19 16:41:36 -060034{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 8 }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050035 spec:
Hyunsun Moon06f98552019-08-15 13:44:47 -060036 {{- if .Values.nodeSelectors.enabled }}
37 nodeSelector:
38 {{ .Values.nodeSelectors.mme.label }}: {{ .Values.nodeSelectors.mme.value }}
39 {{- end }}
40 serviceAccountName: mme
Hyunsun Moon636e17d2019-07-03 12:52:15 -050041 initContainers:
Hyunsun Moon16d70922019-08-25 04:57:25 -050042 {{- if not (hasKey .Values.config.spgwc "mmeAddr") }}
43 - name: mme-configmap-mme-ip
44 image: {{ .Values.images.tags.init | quote }}
45 imagePullPolicy: {{ .Values.images.pullPolicy }}
46 env:
47 - name: NAMESPACE
48 valueFrom:
49 fieldRef:
50 apiVersion: v1
51 fieldPath: metadata.namespace
52 - name: POD_IP
53 valueFrom:
54 fieldRef:
55 fieldPath: status.podIP
56 command: ["/opt/mme/scripts/mme-ip.sh"]
57 volumeMounts:
58 - name: scripts
59 mountPath: /opt/mme/scripts/mme-ip.sh
60 subPath: mme-ip.sh
61 {{- end }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050062 - name: mme-dep-check
Hyunsun Moon06f98552019-08-15 13:44:47 -060063 image: {{ .Values.images.tags.depCheck | quote }}
64 imagePullPolicy: {{ .Values.images.pullPolicy }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050065 securityContext:
66 allowPrivilegeEscalation: false
67 readOnlyRootFilesystem: false
68 runAsUser: 0
69 env:
70 - name: POD_NAME
71 valueFrom:
72 fieldRef:
73 apiVersion: v1
74 fieldPath: metadata.name
75 - name: NAMESPACE
76 valueFrom:
77 fieldRef:
78 apiVersion: v1
79 fieldPath: metadata.namespace
80 - name: PATH
81 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
82 - name: COMMAND
83 value: "echo done"
84 - name: DEPENDENCY_POD_JSON
Hyunsun Moon16d70922019-08-25 04:57:25 -050085 value: '[{"labels": {"app": "hss"}, "requireSameNode": false}]'
Hyunsun Moon636e17d2019-07-03 12:52:15 -050086 # add dependency job for make_certs.sh
87 command:
88 - kubernetes-entrypoint
89 volumeMounts:
90 []
91 - name: mme-init
Hyunsun Moon06f98552019-08-15 13:44:47 -060092 image: {{ .Values.images.tags.mme | quote }}
93 imagePullPolicy: {{ .Values.images.pullPolicy }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050094 command: ["/opt/mme/scripts/mme-init.sh"]
95 env:
Hyunsun Moon16d70922019-08-25 04:57:25 -050096 - name: POD_IP
Hyunsun Moon636e17d2019-07-03 12:52:15 -050097 valueFrom:
98 fieldRef:
99 fieldPath: status.podIP
100 volumeMounts:
101 - name: scripts
102 mountPath: /opt/mme/scripts/mme-init.sh
103 subPath: mme-init.sh
104 - name: configs
105 mountPath: /opt/mme/config
106 - name: shared-data
107 mountPath: /opt/mme/config/shared
108 containers:
109 - name: mme-app
Hyunsun Moon06f98552019-08-15 13:44:47 -0600110 image: {{ .Values.images.tags.mme | quote }}
111 imagePullPolicy: {{ .Values.images.pullPolicy }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500112 command: ["bash", "-xc"]
113 args:
114 - /opt/mme/scripts/mme-run.sh mme-app
Hyunsun Moon06f98552019-08-15 13:44:47 -0600115 {{- if .Values.resources.enabled }}
116 resources:
117{{ toYaml .Values.resources.mme | indent 10 }}
118 {{- end }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500119 volumeMounts:
120 - name: scripts
121 mountPath: /opt/mme/scripts/mme-run.sh
122 subPath: mme-run.sh
123 - name: shared-data
124 mountPath: /opt/mme/config/shared
125 - name: shared-app
126 mountPath: /tmp
127 - name: s1ap-app
Hyunsun Moon06f98552019-08-15 13:44:47 -0600128 image: {{ .Values.images.tags.mme | quote }}
129 imagePullPolicy: {{ .Values.images.pullPolicy }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500130 command: ["bash", "-xc"]
131 args:
132 - /opt/mme/scripts/mme-run.sh s1ap-app
Hyunsun Moon06f98552019-08-15 13:44:47 -0600133 {{- if .Values.resources.enabled }}
134 resources:
135{{ toYaml .Values.resources.mme | indent 10 }}
136 {{- end }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500137 volumeMounts:
138 - name: scripts
139 mountPath: /opt/mme/scripts/mme-run.sh
140 subPath: mme-run.sh
141 - name: shared-data
142 mountPath: /opt/mme/config/shared
143 - name: shared-app
144 mountPath: /tmp
145 - name: s6a-app
Hyunsun Moon06f98552019-08-15 13:44:47 -0600146 image: {{ .Values.images.tags.mme | quote }}
147 imagePullPolicy: {{ .Values.images.pullPolicy }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500148 command: ["bash", "-xc"]
149 args:
150 - /opt/mme/scripts/mme-run.sh s6a-app
Hyunsun Moon06f98552019-08-15 13:44:47 -0600151 {{- if .Values.resources.enabled }}
152 resources:
153{{ toYaml .Values.resources.mme | indent 10 }}
154 {{- end }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500155 volumeMounts:
156 - name: scripts
157 mountPath: /opt/mme/scripts/mme-run.sh
158 subPath: mme-run.sh
159 - name: shared-data
160 mountPath: /opt/mme/config/shared
161 - name: shared-app
162 mountPath: /tmp
163 - name: s11-app
Hyunsun Moon06f98552019-08-15 13:44:47 -0600164 image: {{ .Values.images.tags.mme | quote }}
165 imagePullPolicy: {{ .Values.images.pullPolicy }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500166 command: ["bash", "-xc"]
167 args:
168 - /opt/mme/scripts/mme-run.sh s11-app
Hyunsun Moon06f98552019-08-15 13:44:47 -0600169 {{- if .Values.resources.enabled }}
170 resources:
171{{ toYaml .Values.resources.mme | indent 10 }}
172 {{- end }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500173 volumeMounts:
174 - name: scripts
175 mountPath: /opt/mme/scripts/mme-run.sh
176 subPath: mme-run.sh
177 - name: shared-data
178 mountPath: /opt/mme/config/shared
179 - name: shared-app
180 mountPath: /tmp
181 volumes:
182 - name: scripts
183 configMap:
Hyunsun Moon06f98552019-08-15 13:44:47 -0600184 name: mme
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500185 defaultMode: 493
186 - name: configs
187 configMap:
Hyunsun Moon06f98552019-08-15 13:44:47 -0600188 name: mme
Hyunsun Moon636e17d2019-07-03 12:52:15 -0500189 defaultMode: 420
190 - name: shared-data
191 emptyDir: {}
192 - name: shared-app
193 emptyDir: {}