blob: 7b85e552a44b04b284e2b928caccf9cf3950f883 [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:
20 namespace: {{ .Values.namespace }}
21 name: mme
22spec:
23 selector:
24 app: mme
25 type: NodePort
26 ports:
27 - name: s11
28 port: {{ .Values.mme.ports.s11 }}
29 protocol: UDP
30 - name: s1ap
31 port: {{ .Values.mme.ports.s1ap }}
32 protocol: TCP
33 - name: s6a
34 port: {{ .Values.mme.ports.s6a }}
35 protocol: TCP
36---
37apiVersion: apps/v1
38kind: StatefulSet
39metadata:
40 namespace: {{ .Values.namespace }}
41 name: mme
42 labels:
43 app: mme
44spec:
45 replicas: {{ .Values.mme.replicas }}
46 selector:
47 matchLabels:
48 app: mme
49 serviceName: "mme"
50 template:
51 metadata:
52 namespace: {{ .Values.namespace }}
53 labels:
54 app: mme
55 spec:
56 terminationGracePeriodSeconds: 1
57 initContainers:
58 - name: init-mme
59 image: {{ .Values.mme.images.init }}
60 command: [ "sh", "-c"]
61 securityContext:
62 privileged: true
63 capabilities:
64 add:
65 - NET_ADMIN
66 args:
67 - iptables -A OUTPUT -p sctp --sport {{ .Values.mme.ports.s1ap }} --chunk-types any ABORT -j DROP;
68 until nslookup hss-0.hss.{{ .Values.namespace }}.svc.cluster.local;
69 do echo waiting for hss; sleep 2; done;
70 containers:
71 - name: mme
72 image: {{ .Values.mme.images.mme }}
73 imagePullPolicy: Always
74 env:
75 - name: SGW_S11_IP
76 value: ngic-0.ngic-cp.{{ .Values.namespace }}.svc.cluster.local
77 - name: MME_ETH0_IP
78 valueFrom:
79 fieldRef:
80 fieldPath: status.podIP
81 - name: ENB_S1AP_IP
82 value: {{ .Values.mme.enb_s1ap_ip }}
83 - name: ENB_S1AP_PORT
84 value: "{{ .Values.mme.ports.s1ap }}" #ng4t uses 32767
85 - name: CONNECT_PEER
86 value: hss-0.hss.{{ .Values.namespace }}.svc.cluster.local
87 - name: VAR_HSS_REALM
88 value: hss.{{ .Values.namespace }}.svc.cluster.local
89 - name: HSS_S6A_IP
90 value: hss-0.hss.{{ .Values.namespace }}.svc.cluster.local
91 - name: HSS_PORT
92 value: "{{ .Values.mme.ports.s6a }}"
93 stdin: true
94 tty: true
95 #command: [ "sleep", "3600"]
96 resources:
97 limits:
98 cpu: {{ .Values.mme.resources.cpu }}
99 memory: {{ .Values.mme.resources.mem }}
100 volumeMounts:
101 - name: mme-script
102 mountPath: /opt/c3po/mme/bin/launch.sh
103 subPath: launch.sh
104 - name: mme-config
105 mountPath: /etc/mme/conf
106 volumes:
107 - name: mme-script
108 configMap:
109 name: mme
110 defaultMode: 493
111 - name: mme-config
112 configMap:
113 name: mme
114 defaultMode: 420