blob: d6946de6159b1b5be8689ddb8e9a4139762d9b34 [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
Wei-Yu Chen4a95f852019-01-22 17:03:02 -080025 clusterIP: None
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080026 ports:
27 - name: s11
28 port: {{ .Values.mme.ports.s11 }}
29 protocol: UDP
30 - name: s1ap
31 port: {{ .Values.mme.ports.s1ap }}
Wei-Yu Chenb92af452019-01-31 12:08:19 -080032 protocol: SCTP
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080033 - name: s6a
34 port: {{ .Values.mme.ports.s6a }}
35 protocol: TCP
36---
Matteo Scandolodec3f272019-02-04 13:57:35 -080037apiVersion: v1
38kind: Service
39metadata:
Pingping Lin79f84702019-02-05 18:38:40 -080040 name: mme-external
Matteo Scandolodec3f272019-02-04 13:57:35 -080041spec:
42 selector:
Pingping Lin79f84702019-02-05 18:38:40 -080043 app: mme-external
Matteo Scandolodec3f272019-02-04 13:57:35 -080044 type: NodePort
45 ports:
46 - name: s11
47 port: {{ .Values.mme.ports.s11 }}
48 nodePort: {{ .Values.mme.ports.s11_external }}
49 protocol: TCP
50 - name: s1ap
51 port: {{ .Values.mme.ports.s1ap }}
52 nodePort: {{ .Values.mme.ports.s1ap_external }}
53 protocol: TCP
54 - name: s6a
55 port: {{ .Values.mme.ports.s6a }}
56 nodePort: {{ .Values.mme.ports.s6a_external }}
57 protocol: TCP
58---
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080059apiVersion: apps/v1
60kind: StatefulSet
61metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080062 name: mme
63 labels:
64 app: mme
65spec:
66 replicas: {{ .Values.mme.replicas }}
67 selector:
68 matchLabels:
69 app: mme
70 serviceName: "mme"
71 template:
72 metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080073 labels:
74 app: mme
75 spec:
76 terminationGracePeriodSeconds: 1
77 initContainers:
78 - name: init-mme
79 image: {{ .Values.mme.images.init }}
80 command: [ "sh", "-c"]
81 securityContext:
82 privileged: true
83 capabilities:
84 add:
85 - NET_ADMIN
86 args:
Wei-Yu Chenda76c322019-01-18 13:31:55 -080087 - until nslookup {{ .Values.hss_hostname }}; do echo waiting for hss; sleep 2; done;
Wei-Yu Chen9e5e0462019-01-18 16:58:10 -080088 iptables -A OUTPUT -p sctp --sport {{ .Values.mme.ports.s1ap }} --chunk-types any ABORT -j DROP;
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080089 containers:
90 - name: mme
91 image: {{ .Values.mme.images.mme }}
92 imagePullPolicy: Always
93 env:
94 - name: SGW_S11_IP
Pingping Lin79f84702019-02-05 18:38:40 -080095 value: {{ .Values.spgwc_hostname }}.{{ .Values.namespace }}.svc.cluster.local
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080096 - name: MME_ETH0_IP
97 valueFrom:
98 fieldRef:
99 fieldPath: status.podIP
100 - name: ENB_S1AP_IP
Wei-Yu Chenb92af452019-01-31 12:08:19 -0800101 value: {{ .Values.accelleran_hostname }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800102 - name: ENB_S1AP_PORT
103 value: "{{ .Values.mme.ports.s1ap }}" #ng4t uses 32767
104 - name: CONNECT_PEER
Wei-Yu Chen4182f962019-01-24 15:47:39 -0800105 value: hss-0.{{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800106 - name: VAR_HSS_REALM
Wei-Yu Chen4182f962019-01-24 15:47:39 -0800107 value: {{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800108 - name: HSS_S6A_IP
Wei-Yu Chen4182f962019-01-24 15:47:39 -0800109 value: hss-0.{{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800110 - name: HSS_PORT
111 value: "{{ .Values.mme.ports.s6a }}"
112 stdin: true
113 tty: true
114 #command: [ "sleep", "3600"]
115 resources:
116 limits:
117 cpu: {{ .Values.mme.resources.cpu }}
118 memory: {{ .Values.mme.resources.mem }}
119 volumeMounts:
120 - name: mme-script
121 mountPath: /opt/c3po/mme/bin/launch.sh
122 subPath: launch.sh
123 - name: mme-config
124 mountPath: /etc/mme/conf
125 volumes:
126 - name: mme-script
127 configMap:
128 name: mme
129 defaultMode: 493
130 - name: mme-config
131 configMap:
132 name: mme
133 defaultMode: 420