blob: d0e1ff5858576fa2ccee74df06aa9c3da84fef9d [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:
Wei-Yu Chenda76c322019-01-18 13:31:55 -080064 - until nslookup {{ .Values.hss_hostname }}; do echo waiting for hss; sleep 2; done;
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080065 - iptables -A OUTPUT -p sctp --sport {{ .Values.mme.ports.s1ap }} --chunk-types any ABORT -j DROP;
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080066 containers:
67 - name: mme
68 image: {{ .Values.mme.images.mme }}
69 imagePullPolicy: Always
70 env:
71 - name: SGW_S11_IP
Wei-Yu Chenda76c322019-01-18 13:31:55 -080072 value: {{ .Values.spgwc_hostname }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080073 - name: MME_ETH0_IP
74 valueFrom:
75 fieldRef:
76 fieldPath: status.podIP
77 - name: ENB_S1AP_IP
78 value: {{ .Values.mme.enb_s1ap_ip }}
79 - name: ENB_S1AP_PORT
80 value: "{{ .Values.mme.ports.s1ap }}" #ng4t uses 32767
81 - name: CONNECT_PEER
Wei-Yu Chenda76c322019-01-18 13:31:55 -080082 value: {{ .Values.hss_hostname }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080083 - name: VAR_HSS_REALM
Wei-Yu Chenda76c322019-01-18 13:31:55 -080084 value: {{ .Values.hss_hostname }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080085 - name: HSS_S6A_IP
Wei-Yu Chenda76c322019-01-18 13:31:55 -080086 value: {{ .Values.hss_hostname }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080087 - name: HSS_PORT
88 value: "{{ .Values.mme.ports.s6a }}"
89 stdin: true
90 tty: true
91 #command: [ "sleep", "3600"]
92 resources:
93 limits:
94 cpu: {{ .Values.mme.resources.cpu }}
95 memory: {{ .Values.mme.resources.mem }}
96 volumeMounts:
97 - name: mme-script
98 mountPath: /opt/c3po/mme/bin/launch.sh
99 subPath: launch.sh
100 - name: mme-config
101 mountPath: /etc/mme/conf
102 volumes:
103 - name: mme-script
104 configMap:
105 name: mme
106 defaultMode: 493
107 - name: mme-config
108 configMap:
109 name: mme
110 defaultMode: 420