blob: de416648811e2cacad8628e0f01d20b247e60865 [file] [log] [blame]
Wei-Yu Chen450a98a2019-01-15 16:56:30 -08001---
Wei-Yu Chen53aec362019-01-18 16:30:33 -08002# Copyright 2018-present Open Networking Foundation
3# Copyright 2018 Intel Corporation
Wei-Yu Chen450a98a2019-01-15 16:56:30 -08004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17---
18apiVersion: v1
19kind: Service
20metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080021 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:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080040 name: mme
41 labels:
42 app: mme
43spec:
44 replicas: {{ .Values.mme.replicas }}
45 selector:
46 matchLabels:
47 app: mme
48 serviceName: "mme"
49 template:
50 metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080051 labels:
52 app: mme
53 spec:
54 terminationGracePeriodSeconds: 1
55 initContainers:
56 - name: init-mme
57 image: {{ .Values.mme.images.init }}
58 command: [ "sh", "-c"]
59 securityContext:
60 privileged: true
61 capabilities:
62 add:
63 - NET_ADMIN
64 args:
Wei-Yu Chenda76c322019-01-18 13:31:55 -080065 - until nslookup {{ .Values.hss_hostname }}; do echo waiting for hss; sleep 2; done;
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080066 - iptables -A OUTPUT -p sctp --sport {{ .Values.mme.ports.s1ap }} --chunk-types any ABORT -j DROP;
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080067 containers:
68 - name: mme
69 image: {{ .Values.mme.images.mme }}
70 imagePullPolicy: Always
71 env:
72 - name: SGW_S11_IP
Wei-Yu Chenda76c322019-01-18 13:31:55 -080073 value: {{ .Values.spgwc_hostname }}
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 Chenda76c322019-01-18 13:31:55 -080083 value: {{ .Values.hss_hostname }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080084 - name: VAR_HSS_REALM
Wei-Yu Chenda76c322019-01-18 13:31:55 -080085 value: {{ .Values.hss_hostname }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080086 - name: HSS_S6A_IP
Wei-Yu Chenda76c322019-01-18 13:31:55 -080087 value: {{ .Values.hss_hostname }}
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