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: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 27 | - name: s1ap |
| 28 | port: {{ .Values.mme.ports.s1ap }} |
Wei-Yu Chen | b92af45 | 2019-01-31 12:08:19 -0800 | [diff] [blame] | 29 | protocol: SCTP |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 30 | --- |
Matteo Scandolo | dec3f27 | 2019-02-04 13:57:35 -0800 | [diff] [blame] | 31 | apiVersion: v1 |
| 32 | kind: Service |
| 33 | metadata: |
Pingping Lin | 79f8470 | 2019-02-05 18:38:40 -0800 | [diff] [blame] | 34 | name: mme-external |
Matteo Scandolo | dec3f27 | 2019-02-04 13:57:35 -0800 | [diff] [blame] | 35 | spec: |
| 36 | selector: |
Wei-Yu Chen | ec8a2d7 | 2019-02-12 14:36:10 -0800 | [diff] [blame] | 37 | app: mme |
Matteo Scandolo | dec3f27 | 2019-02-04 13:57:35 -0800 | [diff] [blame] | 38 | type: NodePort |
| 39 | ports: |
Matteo Scandolo | dec3f27 | 2019-02-04 13:57:35 -0800 | [diff] [blame] | 40 | - name: s1ap |
| 41 | port: {{ .Values.mme.ports.s1ap }} |
| 42 | nodePort: {{ .Values.mme.ports.s1ap_external }} |
Wei-Yu Chen | ec8a2d7 | 2019-02-12 14:36:10 -0800 | [diff] [blame] | 43 | protocol: SCTP |
Matteo Scandolo | dec3f27 | 2019-02-04 13:57:35 -0800 | [diff] [blame] | 44 | --- |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 45 | apiVersion: apps/v1 |
| 46 | kind: StatefulSet |
| 47 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 48 | name: mme |
| 49 | labels: |
| 50 | app: mme |
| 51 | spec: |
| 52 | replicas: {{ .Values.mme.replicas }} |
| 53 | selector: |
| 54 | matchLabels: |
| 55 | app: mme |
| 56 | serviceName: "mme" |
| 57 | template: |
| 58 | metadata: |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 59 | labels: |
| 60 | app: mme |
| 61 | spec: |
Wei-Yu Chen | ec8a2d7 | 2019-02-12 14:36:10 -0800 | [diff] [blame] | 62 | nodeSelector: |
Wei-Yu Chen | 9f533ef | 2019-02-18 11:39:17 -0800 | [diff] [blame] | 63 | kubernetes.io/hostname: "{{ .Values.mme_node_selector }}" |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 64 | 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 Chen | da76c32 | 2019-01-18 13:31:55 -0800 | [diff] [blame] | 75 | - 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] | 76 | 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] | 77 | containers: |
| 78 | - name: mme |
| 79 | image: {{ .Values.mme.images.mme }} |
| 80 | imagePullPolicy: Always |
| 81 | env: |
| 82 | - name: SGW_S11_IP |
Pingping Lin | 79f8470 | 2019-02-05 18:38:40 -0800 | [diff] [blame] | 83 | value: {{ .Values.spgwc_hostname }}.{{ .Values.namespace }}.svc.cluster.local |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 84 | - name: MME_ETH0_IP |
| 85 | valueFrom: |
| 86 | fieldRef: |
| 87 | fieldPath: status.podIP |
| 88 | - name: ENB_S1AP_IP |
Wei-Yu Chen | b92af45 | 2019-01-31 12:08:19 -0800 | [diff] [blame] | 89 | value: {{ .Values.accelleran_hostname }} |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 90 | - name: ENB_S1AP_PORT |
Wei-Yu Chen | ec8a2d7 | 2019-02-12 14:36:10 -0800 | [diff] [blame] | 91 | value: "{{ .Values.accelleran_port }}" #ng4t uses 32767 |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 92 | - name: CONNECT_PEER |
Wei-Yu Chen | 4182f96 | 2019-01-24 15:47:39 -0800 | [diff] [blame] | 93 | value: hss-0.{{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 94 | - name: VAR_HSS_REALM |
Wei-Yu Chen | 4182f96 | 2019-01-24 15:47:39 -0800 | [diff] [blame] | 95 | value: {{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 96 | - name: HSS_S6A_IP |
Wei-Yu Chen | 4182f96 | 2019-01-24 15:47:39 -0800 | [diff] [blame] | 97 | value: hss-0.{{ .Values.hss_hostname }}.{{ .Values.namespace }}.svc.cluster.local |
Wei-Yu Chen | 450a98a | 2019-01-15 16:56:30 -0800 | [diff] [blame] | 98 | - 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 |