blob: 2f2ebd44bd154e5ada69c6eaa8a56e457c1e1f96 [file] [log] [blame]
Wei-Yu Chen450a98a2019-01-15 16:56:30 -08001---
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16---
17apiVersion: v1
18kind: Service
19metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080020 name: mme
21spec:
22 selector:
23 app: mme
24 type: NodePort
25 ports:
26 - name: s11
27 port: {{ .Values.mme.ports.s11 }}
28 protocol: UDP
29 - name: s1ap
30 port: {{ .Values.mme.ports.s1ap }}
31 protocol: TCP
32 - name: s6a
33 port: {{ .Values.mme.ports.s6a }}
34 protocol: TCP
35---
36apiVersion: apps/v1
37kind: StatefulSet
38metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080039 name: mme
40 labels:
41 app: mme
42spec:
43 replicas: {{ .Values.mme.replicas }}
44 selector:
45 matchLabels:
46 app: mme
47 serviceName: "mme"
48 template:
49 metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080050 labels:
51 app: mme
52 spec:
53 terminationGracePeriodSeconds: 1
54 initContainers:
55 - name: init-mme
56 image: {{ .Values.mme.images.init }}
57 command: [ "sh", "-c"]
58 securityContext:
59 privileged: true
60 capabilities:
61 add:
62 - NET_ADMIN
63 args:
64 - iptables -A OUTPUT -p sctp --sport {{ .Values.mme.ports.s1ap }} --chunk-types any ABORT -j DROP;
Wei-Yu Chenb3409b82019-01-17 15:34:23 -080065 until nslookup hss;
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080066 do echo waiting for hss; sleep 2; done;
67 containers:
68 - name: mme
69 image: {{ .Values.mme.images.mme }}
70 imagePullPolicy: Always
71 env:
72 - name: SGW_S11_IP
Wei-Yu Chenb3409b82019-01-17 15:34:23 -080073 value: ngic-cp
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080074 - name: MME_ETH0_IP
75 valueFrom:
76 fieldRef:
77 fieldPath: status.podIP
78 - name: ENB_S1AP_IP
79 value: {{ .Values.mme.enb_s1ap_ip }}
80 - name: ENB_S1AP_PORT
81 value: "{{ .Values.mme.ports.s1ap }}" #ng4t uses 32767
82 - name: CONNECT_PEER
Wei-Yu Chenb3409b82019-01-17 15:34:23 -080083 value: hss
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080084 - name: VAR_HSS_REALM
Wei-Yu Chenb3409b82019-01-17 15:34:23 -080085 value: hss
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080086 - name: HSS_S6A_IP
Wei-Yu Chenb3409b82019-01-17 15:34:23 -080087 value: hss
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080088 - name: HSS_PORT
89 value: "{{ .Values.mme.ports.s6a }}"
90 stdin: true
91 tty: true
92 #command: [ "sleep", "3600"]
93 resources:
94 limits:
95 cpu: {{ .Values.mme.resources.cpu }}
96 memory: {{ .Values.mme.resources.mem }}
97 volumeMounts:
98 - name: mme-script
99 mountPath: /opt/c3po/mme/bin/launch.sh
100 subPath: launch.sh
101 - name: mme-config
102 mountPath: /etc/mme/conf
103 volumes:
104 - name: mme-script
105 configMap:
106 name: mme
107 defaultMode: 493
108 - name: mme-config
109 configMap:
110 name: mme
111 defaultMode: 420