Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 1 | --- |
| 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 | --- |
| 17 | apiVersion: v1 |
| 18 | kind: Service |
| 19 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 20 | name: mme |
| 21 | spec: |
| 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 | --- |
| 36 | apiVersion: apps/v1 |
| 37 | kind: StatefulSet |
| 38 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 39 | name: mme |
| 40 | labels: |
| 41 | app: mme |
| 42 | spec: |
| 43 | replicas: {{ .Values.mme.replicas }} |
| 44 | selector: |
| 45 | matchLabels: |
| 46 | app: mme |
| 47 | serviceName: "mme" |
| 48 | template: |
| 49 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 50 | 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: |
| 64 | - iptables -A OUTPUT -p sctp --sport {{ .Values.mme.ports.s1ap }} --chunk-types any ABORT -j DROP; |
Wei-Yu Chen | b3409b8 | 2019-01-17 15:34:23 -0800 | [diff] [blame] | 65 | until nslookup hss; |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 66 | do echo waiting for hss; sleep 2; done; |
| 67 | containers: |
| 68 | - name: mme |
| 69 | image: {{ .Values.mme.images.mme }} |
| 70 | imagePullPolicy: Always |
| 71 | env: |
| 72 | - name: SGW_S11_IP |
Wei-Yu Chen | b3409b8 | 2019-01-17 15:34:23 -0800 | [diff] [blame] | 73 | value: ngic-cp |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 74 | - 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 Chen | b3409b8 | 2019-01-17 15:34:23 -0800 | [diff] [blame] | 83 | value: hss |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 84 | - name: VAR_HSS_REALM |
Wei-Yu Chen | b3409b8 | 2019-01-17 15:34:23 -0800 | [diff] [blame] | 85 | value: hss |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 86 | - name: HSS_S6A_IP |
Wei-Yu Chen | b3409b8 | 2019-01-17 15:34:23 -0800 | [diff] [blame] | 87 | value: hss |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 88 | - 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 |