blob: 9685c8285d2323d97796a78a5c1de8456d443262 [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:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080027 - name: s1ap
28 port: {{ .Values.mme.ports.s1ap }}
Wei-Yu Chenb92af452019-01-31 12:08:19 -080029 protocol: SCTP
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080030---
Matteo Scandolodec3f272019-02-04 13:57:35 -080031apiVersion: v1
32kind: Service
33metadata:
Pingping Lin79f84702019-02-05 18:38:40 -080034 name: mme-external
Matteo Scandolodec3f272019-02-04 13:57:35 -080035spec:
36 selector:
Wei-Yu Chenec8a2d72019-02-12 14:36:10 -080037 app: mme
Matteo Scandolodec3f272019-02-04 13:57:35 -080038 type: NodePort
39 ports:
Matteo Scandolodec3f272019-02-04 13:57:35 -080040 - name: s1ap
41 port: {{ .Values.mme.ports.s1ap }}
42 nodePort: {{ .Values.mme.ports.s1ap_external }}
Wei-Yu Chenec8a2d72019-02-12 14:36:10 -080043 protocol: SCTP
Matteo Scandolodec3f272019-02-04 13:57:35 -080044---
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080045apiVersion: apps/v1
46kind: StatefulSet
47metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080048 name: mme
49 labels:
50 app: mme
51spec:
52 replicas: {{ .Values.mme.replicas }}
53 selector:
54 matchLabels:
55 app: mme
56 serviceName: "mme"
57 template:
58 metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080059 labels:
60 app: mme
61 spec:
Wei-Yu Chenec8a2d72019-02-12 14:36:10 -080062 nodeSelector:
Wei-Yu Chen9f533ef2019-02-18 11:39:17 -080063 kubernetes.io/hostname: "{{ .Values.mme_node_selector }}"
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080064 terminationGracePeriodSeconds: 1
65 initContainers:
66 - name: init-mme
67 image: {{ .Values.mme.images.init }}
68 command: [ "sh", "-c"]
69 securityContext:
70 privileged: true
71 capabilities:
72 add:
73 - NET_ADMIN
74 args:
Wei-Yu Chenda76c322019-01-18 13:31:55 -080075 - until nslookup {{ .Values.hss_hostname }}; do echo waiting for hss; sleep 2; done;
Wei-Yu Chen9e5e0462019-01-18 16:58:10 -080076 iptables -A OUTPUT -p sctp --sport {{ .Values.mme.ports.s1ap }} --chunk-types any ABORT -j DROP;
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080077 containers:
78 - name: mme
79 image: {{ .Values.mme.images.mme }}
80 imagePullPolicy: Always
81 env:
82 - name: SGW_S11_IP
Pingping Lin79f84702019-02-05 18:38:40 -080083 value: {{ .Values.spgwc_hostname }}.{{ .Values.namespace }}.svc.cluster.local
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080084 - name: MME_ETH0_IP
85 valueFrom:
86 fieldRef:
87 fieldPath: status.podIP
88 - name: ENB_S1AP_IP
Wei-Yu Chenb92af452019-01-31 12:08:19 -080089 value: {{ .Values.accelleran_hostname }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080090 - name: ENB_S1AP_PORT
Wei-Yu Chenec8a2d72019-02-12 14:36:10 -080091 value: "{{ .Values.accelleran_port }}" #ng4t uses 32767
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080092 - name: CONNECT_PEER
Wei-Yu Chen4182f962019-01-24 15:47:39 -080093 value: hss-0.{{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080094 - name: VAR_HSS_REALM
Wei-Yu Chen4182f962019-01-24 15:47:39 -080095 value: {{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080096 - name: HSS_S6A_IP
Wei-Yu Chen4182f962019-01-24 15:47:39 -080097 value: hss-0.{{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080098 - name: HSS_PORT
99 value: "{{ .Values.mme.ports.s6a }}"
100 stdin: true
101 tty: true
102 #command: [ "sleep", "3600"]
103 resources:
104 limits:
105 cpu: {{ .Values.mme.resources.cpu }}
106 memory: {{ .Values.mme.resources.mem }}
107 volumeMounts:
108 - name: mme-script
109 mountPath: /opt/c3po/mme/bin/launch.sh
110 subPath: launch.sh
111 - name: mme-config
112 mountPath: /etc/mme/conf
113 volumes:
114 - name: mme-script
115 configMap:
116 name: mme
117 defaultMode: 493
118 - name: mme-config
119 configMap:
120 name: mme
121 defaultMode: 420