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 |
Wei-Yu Chen | 4a95f85 | 2019-01-22 17:03:02 -0800 | [diff] [blame] | 25 | clusterIP: None |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 26 | ports: |
| 27 | - name: s11 |
| 28 | port: {{ .Values.mme.ports.s11 }} |
| 29 | protocol: UDP |
| 30 | - name: s1ap |
| 31 | port: {{ .Values.mme.ports.s1ap }} |
Wei-Yu Chen | b92af45 | 2019-01-31 12:08:19 -0800 | [diff] [blame] | 32 | protocol: SCTP |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 33 | - name: s6a |
| 34 | port: {{ .Values.mme.ports.s6a }} |
| 35 | protocol: TCP |
| 36 | --- |
Matteo Scandolo | dec3f27 | 2019-02-04 13:57:35 -0800 | [diff] [blame] | 37 | apiVersion: v1 |
| 38 | kind: Service |
| 39 | metadata: |
Pingping Lin | 79f8470 | 2019-02-05 18:38:40 -0800 | [diff] [blame] | 40 | name: mme-external |
Matteo Scandolo | dec3f27 | 2019-02-04 13:57:35 -0800 | [diff] [blame] | 41 | spec: |
| 42 | selector: |
Pingping Lin | 79f8470 | 2019-02-05 18:38:40 -0800 | [diff] [blame] | 43 | app: mme-external |
Matteo Scandolo | dec3f27 | 2019-02-04 13:57:35 -0800 | [diff] [blame] | 44 | 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 Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 59 | apiVersion: apps/v1 |
| 60 | kind: StatefulSet |
| 61 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 62 | name: mme |
| 63 | labels: |
| 64 | app: mme |
| 65 | spec: |
| 66 | replicas: {{ .Values.mme.replicas }} |
| 67 | selector: |
| 68 | matchLabels: |
| 69 | app: mme |
| 70 | serviceName: "mme" |
| 71 | template: |
| 72 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 73 | 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 Chen | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 87 | - 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] | 88 | 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] | 89 | containers: |
| 90 | - name: mme |
| 91 | image: {{ .Values.mme.images.mme }} |
| 92 | imagePullPolicy: Always |
| 93 | env: |
| 94 | - name: SGW_S11_IP |
Pingping Lin | 79f8470 | 2019-02-05 18:38:40 -0800 | [diff] [blame] | 95 | value: {{ .Values.spgwc_hostname }}.{{ .Values.namespace }}.svc.cluster.local |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 96 | - name: MME_ETH0_IP |
| 97 | valueFrom: |
| 98 | fieldRef: |
| 99 | fieldPath: status.podIP |
| 100 | - name: ENB_S1AP_IP |
Wei-Yu Chen | b92af45 | 2019-01-31 12:08:19 -0800 | [diff] [blame] | 101 | value: {{ .Values.accelleran_hostname }} |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 102 | - name: ENB_S1AP_PORT |
| 103 | value: "{{ .Values.mme.ports.s1ap }}" #ng4t uses 32767 |
| 104 | - name: CONNECT_PEER |
Wei-Yu Chen | 4182f96 | 2019-01-24 15:47:39 -0800 | [diff] [blame] | 105 | value: hss-0.{{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 106 | - name: VAR_HSS_REALM |
Wei-Yu Chen | 4182f96 | 2019-01-24 15:47:39 -0800 | [diff] [blame] | 107 | value: {{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 108 | - name: HSS_S6A_IP |
Wei-Yu Chen | 4182f96 | 2019-01-24 15:47:39 -0800 | [diff] [blame] | 109 | value: hss-0.{{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 110 | - 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 |