Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 1 | --- |
Wei-Yu Chen | 53aec36 | 2019-01-18 16:30:33 -0800 | [diff] [blame] | 2 | # Copyright 2018-present Open Networking Foundation |
| 3 | # Copyright 2018 Intel Corporation |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 4 | # |
| 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 | --- |
| 18 | apiVersion: v1 |
| 19 | kind: Service |
| 20 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 21 | name: mme |
| 22 | spec: |
| 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 | --- |
| 37 | apiVersion: apps/v1 |
| 38 | kind: StatefulSet |
| 39 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 40 | name: mme |
| 41 | labels: |
| 42 | app: mme |
| 43 | spec: |
| 44 | replicas: {{ .Values.mme.replicas }} |
| 45 | selector: |
| 46 | matchLabels: |
| 47 | app: mme |
| 48 | serviceName: "mme" |
| 49 | template: |
| 50 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 51 | 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 Chen | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 65 | - until nslookup {{ .Values.hss_hostname }}; do echo waiting for hss; sleep 2; done; |
Wei-Yu Chen | 9e5e046 | 2019-01-18 16:58:10 -0800 | [diff] [blame] | 66 | iptables -A OUTPUT -p sctp --sport {{ .Values.mme.ports.s1ap }} --chunk-types any ABORT -j DROP; |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 67 | containers: |
| 68 | - name: mme |
| 69 | image: {{ .Values.mme.images.mme }} |
| 70 | imagePullPolicy: Always |
| 71 | env: |
| 72 | - name: SGW_S11_IP |
Wei-Yu Chen | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 73 | value: {{ .Values.spgwc_hostname }} |
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 | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 83 | value: {{ .Values.hss_hostname }} |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 84 | - name: VAR_HSS_REALM |
Wei-Yu Chen | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 85 | value: {{ .Values.hss_hostname }} |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 86 | - name: HSS_S6A_IP |
Wei-Yu Chen | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 87 | value: {{ .Values.hss_hostname }} |
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 |